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):
;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.