Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

ShockwaveFlash.ShockwaveFlash


  • Please log in to reply
5 replies to this topic

#1 cyanidemonkey

cyanidemonkey

    Adventurer

  • Active Members
  • PipPip
  • 142 posts

Posted 15 July 2009 - 04:53 AM

has anybody tried using the activeX flash embed to play flash files that use external xml (pretty common when externalising data in flash development)

we are finding it works well when it's plain flash files, but if the .swf references external xml file for text or data it errors out saying the xml file can not be found (flash debug error, not au3 error), however the flash file runs fine in the exact same directory when not ran within AutoIt wrapper.

relevent code below as example (my attempt to set base commented out, made zero difference to error):
Plain Text         
;External SWF File Name (assumed in same folder) $swffile = "FrameworkV2.swf" $winTitle = "METAL INDUSTRY GUIDELINES Module Launcher" ;Create the Shockwave Flash Object - this can contain Flex as well as Flash SWF Files $oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash") If @error Then     ;no flash player error here.     MsgBox(48, "Error", "Unable to launch course." & @LF & "Adobe Flash Player not on this system." & @LF & "Contact your IT Department.")     Exit EndIf ;Create the AutoIT GUI Window $hModWnd = GuiCreate($winTitle, 1024, 768, -1, -1, $WS_POPUP ) ;Create the ActiveX Container $GUIActiveX = GUICtrlCreateObj( $oFlash, 0, 0 , 1024, 768 ) ;Set up event handling for Flex externalAPI calls $SinkObject=ObjEvent($oFlash, "Flash_") ; ;Set up COM error handling $oMyError = ObjEvent("AutoIt.Error","COMErrFunc") ;Initialize the Flash ActiveX With $oFlash; Object tag pool       .Movie = FileGetShortName(@scriptdir & '\' & $swffile)     .ScaleMode = 3; 0 showall, 1 noborder, 2 exactFit, 3 noscale     .bgcolor = "#000000"     .Loop = False     .wmode = "transparent"; Opaque / transparent     .allowScriptAccess = "Always" ;   .base = "." ;   .base = @scriptdir & '\.' ;   .base = @scriptdir & "\" ;   .src = FileGetShortName(@scriptdir & '\' & $swffile) ;   .id = "FrameworkV2" ;   .name = "FrameworkV2" EndWith

Edited by cyanidemonkey, 15 July 2009 - 04:55 AM.

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator








#2 Authenticity

Authenticity

    Universalist

  • MVPs
  • 2,619 posts

Posted 15 July 2009 - 08:26 PM

Maybe it's because of a security sandbox exception that prevent the content to be loaded because of security design? Try to load the SWF file from another SWF file and load the loader file using AutoIt. You may want to look in the Loader class, especially the second parameter of the constructor. If it's AS3 AVM2 loading AVM1 code then I guess there won't be any issues but the opposite is not true.
...and I might be totally wrong because of lacking of a few cells.

#3 cyanidemonkey

cyanidemonkey

    Adventurer

  • Active Members
  • PipPip
  • 142 posts

Posted 16 July 2009 - 04:54 AM

i don't think it's security sandbox related. the flash debug error is always the same, no matter what is put in the base of the activeX flash embed code.

Error: Could not load course definition from 'file://course/course.xml': Error #2032: Stream Error. URL: file://course/course.xml


ran as a .swf, or flash compiled .exe, no issue, just using activeX object this comes up. i believe it is an ActiveX/shockwaveflash player issue, just thought someone may have already had an au3 work around.

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator


#4 Authenticity

Authenticity

    Universalist

  • MVPs
  • 2,619 posts

Posted 16 July 2009 - 07:24 PM

Can you post the link to the site hosting the SWF file?

#5 cyanidemonkey

cyanidemonkey

    Adventurer

  • Active Members
  • PipPip
  • 142 posts

Posted 16 July 2009 - 10:56 PM

Can you post the link to the site hosting the SWF file?


It's not internet based it's local for CDrom. I can not post it due to comercial sensitivity and all that blah.
Our geekiest programmer has got around it by not using ActiveX, but calling the Flash.ocx and a bunch of other stuff to make flash not change the base path in C. Sorry, I can not post the C work around to be emulated in au3, I'd get in trouble with work. I know it was not an easy fix, it took him about 4 days on it.

He did say he got around it by setting a URLmonica or something like that, changing foward slashes to back slashes and that it had to be a URLmonica not a file monica, and that Flash is very fussy about it.
All over my head, but if it stears anyone in the right direction I hope it helps.

Edited by cyanidemonkey, 16 July 2009 - 11:08 PM.

My AutoIt Scripts.- AutoHost and Password Enabler for Delta Force 2 Demo.| Caffine for Winamp 2.9x and WRS 2.0 | mp3 directory cleaner | CRAP DJ | A:B:J Radio Automation Software | FFMPEG batch conversion automator


#6 Richard Robertson

Richard Robertson

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 10,295 posts

Posted 17 July 2009 - 04:26 PM

Adobe decided that local flash objects aren't allowed to execute local data on a user's computer unless you allow it to in the settings panel (which is only available on Adobe's website for-who-knows-what-reason).

I ran into this problem a while back. It started just after Adobe took control of Flash.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users