xIShoopuffIx Posted June 30, 2008 Share Posted June 30, 2008 Well I am able to find the source and such. Whenever I try to embed a swf into my gui it gives me the option to debug or not and nothing happens. I'm not sure what is wrong. Any ideas? By the way, the link I use to the game is fine because I can navigate to it in any web browser. Link to comment Share on other sites More sharing options...
xIShoopuffIx Posted July 3, 2008 Author Share Posted July 3, 2008 Bump? Link to comment Share on other sites More sharing options...
ChrisL Posted July 3, 2008 Share Posted July 3, 2008 Show us some code of how your trying to do it... [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted July 3, 2008 Share Posted July 3, 2008 (edited) Just been messing around with adding flash, maybe there is a better way but can you use or modify this to your needs? expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Embedded Flash", 640, 580, (@DesktopWidth - 640) / 2, (@DesktopHeight - 580) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $Flash = _GuiCtrlCreateFlash(10,60,600,300,"http://www.flashgames247.com/images/logo_rhino_199x91.swf") GUISetState() ;Show GUI ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Func _GuiCtrlCreateFlash($iXpos,$iYpos,$iWidth,$iHeight,$vSWFPath) $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj ($oIE, $iXpos, $iYpos, $iWidth, $iHeight) $tmp = '<object width="' & $iWidth & '" height="' & $iHeight & '">' $tmp &= '<param name="movie" value="AutoIt.swf">' $tmp &= '<embed src="' & $vSWFPath & '" width="' & $iWidth-42 & '" height="' & $iHeight-42 & '">' $tmp &= '</embed>' $hFile = FileOpen(@tempDir & "\AutoItFlash.html",2) FileWrite($hFile,$tmp) FileClose($hFile) $oIE.navigate(@tempDir & "\AutoItFlash.html") Return $GUIActiveX EndFunc Edited July 3, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
ChrisL Posted July 3, 2008 Share Posted July 3, 2008 (edited) Update.. it does work for games! expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> GUICreate("Embedded Flash", 640, 680, (@DesktopWidth - 640) / 2, (@DesktopHeight - 680) / 2, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN)) $Flash = _GuiCtrlCreateFlash(10,10,400,300,"http://www.2inept.co.uk/icecastleblaster.swf") $Flash2 = _GuiCtrlCreateFlash(10,330,600,300,"http://www.flashgames247.com/images/logo_rhino_199x91.swf") GUISetState() ;Show GUI ; Waiting for user to close the window While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd GUIDelete() Func _GuiCtrlCreateFlash($iXpos,$iYpos,$iWidth,$iHeight,$vSWFPath) $oIE = ObjCreate("Shell.Explorer.2") $GUIActiveX = GUICtrlCreateObj ($oIE, $iXpos, $iYpos, $iWidth, $iHeight) $tmp = '<object width="' & $iWidth & '" height="' & $iHeight & '">' $tmp &= '<param name="movie" value="AutoIt.swf">' $tmp &= '<embed src="' & $vSWFPath & '" width="' & $iWidth-42 & '" height="' & $iHeight-42 & '">' $tmp &= '</embed>' $hFile = FileOpen(@tempDir & "\AutoItFlash.html",2) FileWrite($hFile,$tmp) FileClose($hFile) $oIE.navigate(@tempDir & "\AutoItFlash.html") FileDelete(@tempDir & "\AutoItFlash.html") Return $GUIActiveX EndFunc Edited July 3, 2008 by ChrisL [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
xIShoopuffIx Posted July 9, 2008 Author Share Posted July 9, 2008 (edited) Yea, I just checked back here! Thankyou very much for your help, I'm currently running through your _GUICtrlCreateFlash func to understand it, a little much for me, but I'll get it. EDIT: I see, you embed it in a html file and then navigate to it, smart. It's a great idea. I wouldn't have thought of it. Edited July 10, 2008 by xIShoopuffIx Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now