ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Other Software > Developer's Corner

FBSL - How to embedd a flash PACMAN

(1/1)

Gerome:
Hello,

This code is an FBSL one.
This will show you how to embedd a flash game into a GUI application :)

To compile this script into a real stand alone EXEcutable, i invite you to copy/paste this script there :
http://gedd123.free.fr/studio/fbsl2exe.php


--- ---'// ----------------------------------------
'// ATL control
'// Purpose : running a Flash GAME
'// Author  : Gerome GUILLEMIN
'// ----------------------------------------
Dim %oFlash, %hWnd

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()
   RefreshAfxControl()
   Begin Events
      If CBMsg = WM_CLOSE Then
          ReleaseObject( oFlash ): ExitProgram(0)
      End If
      If CBMSG = WM_SIZE Then RefreshAfxControl()
   End Events
End Sub

Any comments ? :)
Enjoy ;)

mouser:
cool.

Gerome:
Hi,

cool.
-mouser (February 06, 2006, 05:59 PM)
--- End quote ---

Into the script, just replace

--- ---PutValue( oFlash, ".Movie=%s", "http://www.80smusiclyrics.com/games/pacman/pacman.swf" )

by any kinda real cool flash game name (local path or internet link)...
I guess you have tons of those kinda gamez somewhere ? :)

Navigation

[0] Message Index

Go to full version