Gerome 0 Report post Posted December 5, 2005 Hello, Have you ever dreamed about embedding some COM control to a classical winform in order to be able to play with some flash animations ? Yes it is possible... just have a look to the code below... expandcollapse popup'// ---------------------------------------- '// ATL control '// Purpose : using a Flash animation '// Author : Gerome GUILLEMIN '// Date : 05/12/2005 '// ---------------------------------------- Dim %oFlash, %hWnd If Not STANDALONE Then Fbsl2Exe( Command(1) ) ExitProgram(1) End If Sub Form_Load() Apicall( "AtlAxWinInit", "ATL" ) Dim $WinName = "{D27CDB6E-AE6D-11CF-96B8-444553540000}" hWnd = FBSL_Control("AtlAxWin", Me, WinName, 0, 0, 15, 620, 460, WS_Child + WS_Visible, WS_Ex_ClientEdge) Apicall( "AtlAxGetControl", "ATL", hWnd, @oFlash ) PutValue( oFlash, ".Movie=%s", "http://www.80smusiclyrics.com/games/pacman/pacman.swf" ) End Sub Sub RefreshAfxControl() Dim %Lefti, %Topi, %Righti, %Bottomi GetClientRect( Me, Lefti, Topi, Righti, Bottomi ) ReSize(hWnd, 0, 30, Righti - 15, Bottomi - 60) Refresh(hWnd) End Sub Sub Main() Fbsl_SetText( Me, "PaC-man..." ) Resize(Me, 0, 0, 640, 480 ) Center(Me): Show(Me): Form_Load() Begin Events If CBMsg = WM_CLOSE Then ReleaseObject( oFlash ): ExitProgram(0) End If If CBMSG = WM_SIZE Then RefreshAfxControl() End Events End Sub Enjoy Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster... Share this post Link to post Share on other sites
GaryFrost 11 Report post Posted December 5, 2005 Hello, Have you ever dreamed about embedding some COM control to a classical winform in order to be able to play with some flash animations ? Yes it is possible... just have a look to the code below... expandcollapse popup'// ---------------------------------------- '// ATL control '// Purpose : using a Flash animation '// Author : Gerome GUILLEMIN '// Date : 05/12/2005 '// ---------------------------------------- Dim %oFlash, %hWnd If Not STANDALONE Then Fbsl2Exe( Command(1) ) ExitProgram(1) End If Sub Form_Load() Apicall( "AtlAxWinInit", "ATL" ) Dim $WinName = "{D27CDB6E-AE6D-11CF-96B8-444553540000}" hWnd = FBSL_Control("AtlAxWin", Me, WinName, 0, 0, 15, 620, 460, WS_Child + WS_Visible, WS_Ex_ClientEdge) Apicall( "AtlAxGetControl", "ATL", hWnd, @oFlash ) PutValue( oFlash, ".Movie=%s", "http://www.80smusiclyrics.com/games/pacman/pacman.swf" ) End Sub Sub RefreshAfxControl() Dim %Lefti, %Topi, %Righti, %Bottomi GetClientRect( Me, Lefti, Topi, Righti, Bottomi ) ReSize(hWnd, 0, 30, Righti - 15, Bottomi - 60) Refresh(hWnd) End Sub Sub Main() Fbsl_SetText( Me, "PaC-man..." ) Resize(Me, 0, 0, 640, 480 ) Center(Me): Show(Me): Form_Load() Begin Events If CBMsg = WM_CLOSE Then ReleaseObject( oFlash ): ExitProgram(0) End If If CBMSG = WM_SIZE Then RefreshAfxControl() End Events End Sub Enjoy Would be even more impressive if this code was in autoit SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Share this post Link to post Share on other sites
svennie 0 Report post Posted December 5, 2005 Would be even more impressive if this code was in autoitYeah, if you need help to convert it post it in the support forum.If you just want to post it this is a AutoIt forum.But when you still post it (what isnt right) please add to your post that it is not a AutoIt script but a (...) script. Sorry for my English, I'm Dutch... =DMedia UDFINet Adv UDF Share this post Link to post Share on other sites
Gerome 0 Report post Posted December 5, 2005 Hi,Yeah, if you need help to convert it post it in the support forum.If you just want to post it this is a AutoIt forum.But when you still post it (what isnt right) please add to your post that it is not a AutoIt script but a (...) script. Yeah, i can uderstand BTW, i really dunno if AutoIt is able to manage ATL and pointers, so i've posted the sample using my own script language, may be someone can help to port it to Autoit if he wants to... Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster... Share this post Link to post Share on other sites
piccaso 0 Report post Posted December 5, 2005 ... and we should start posting autoit code to fbsl forums? are you a friend of the dev's or just spamming around? i realy like fbsl (not like autoit but i like it) but you advertising methods seem to be a bit unfair... CoProc Multi Process Helper libraryTrashBin.nfshost.com store your AutoIt related files here!AutoIt User Map Share this post Link to post Share on other sites
Mosquitos 0 Report post Posted December 5, 2005 (edited) If you search the forums you maybe found this... #include <GUIConstants.au3> $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.1") GUICreate ("PacMan", 820, 600, -1, -1) $GUIActiveX = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580) With $oRP; Object tag pool .bgcolor = "#000000"; change background color to white FFFFFF .Movie = 'http://www.80smusiclyrics.com/games/pacman/pacman.swf'; the wave file from inet / could be on disk .ScaleMode = 2 .Loop = True .wmode = "Opaque"; Opaque / transparent ;.Stop / .Play EndWith GUISetState ();Show GUI While 1 $msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop EndSelect WEnd $oRP = 0; FREE THE OBJECT GUIDelete () Exit The idea is from Kjactive Edited December 5, 2005 by Mosquitos Sapiente vince, rex, noli vincere ferro! Share this post Link to post Share on other sites
Gerome 0 Report post Posted December 5, 2005 Hello,If you search the forums you maybe found this... ...The idea is from KjactiveThanks I've taken the idea from the RapidQ e-group forum So this sample idea has made a tour around the World Happy to see it in AutoIt Yours,(¯`·._.·[Gerome GUILLEMIN] [Freestyle Basic Script Language Author]·._.·´¯):: Full SETUP w. HELP ::FBSL official web siteA keyboard is infinitely better as a programming tool than a toaster... Share this post Link to post Share on other sites