Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • February 06, 2016, 12:36:33 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: FBSL - How to embedd a flash PACMAN  (Read 4431 times)

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
FBSL - How to embedd a flash PACMAN
« on: February 06, 2006, 05:46:55 PM »
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..../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 ;)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)
« Last Edit: February 07, 2006, 05:39:54 AM by mouser »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 35,714
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Donate to Member
Re: How to embedd a flash PACMAN
« Reply #1 on: February 06, 2006, 05:59:26 PM »
cool.

Gerome

  • Charter Honorary Member
  • Joined in 2006
  • ***
  • Posts: 154
    • View Profile
    • Get my Freestyle Basic Script Language + compiler!
    • Donate to Member
Re: FBSL - How to embedd a flash PACMAN
« Reply #2 on: February 08, 2006, 03:50:01 AM »
Hi,

cool.

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 ? :)
Yours,
(¯`·._.·[Gerome GUILLEMIN]·._.·´¯)
http://www.fbsl.net [FBSL Author]
http://gedd123.free.fr/FBSLv3.zip [FBSL Help file]
(¯`·._.·[If you need help... just ask]·._.·´¯)