Jump to content

make a gui that loads a local swf file?


Recommended Posts

#include <GUIConstantsEx.au3>

HotKeySet('{ESC}', '_Close')
Opt('GUIOnEventMode', 1)

Global $hGUI, $FlashCtrl
Global $oFlash
Global $fError = False

$hGUI = GUICreate('Test', 550, 400)

$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.10")
$oAutoItError = ObjEvent("AutoIt.Error", "COMError")

$FlashCtrl = GUICtrlCreateObj($oFlash, 0, 0, 550, 400)
GUISetOnEvent($GUI_EVENT_CLOSE, '_Close')

With $oFlash
    ; Put the file string here.
    .Movie = @ScriptDir & '\file.swf'
    #cs Example
        .Movie = "http://64.191.61.82/albino_games04/curveball(www.albinoblacksheep.com).swf"
        .Base = "http://www.albinoblacksheep.com/flash/curveball"
    #ce
    .wmode = "opaque"
    .allowScriptAccess = "Always"
    .Playing = True
EndWith

GUISetState()

While 1
    Sleep(10)
WEnd

Func _Close()
    $oFlash.Stop()
    $oFlash = 0
    GUIDelete()
    Exit
EndFunc

Func COMError()
    $fError = True
EndFunc

Link to comment
Share on other sites

  • 4 months later...
  • 3 years later...

This code seems to work for me when i press F5 in the script, however when i compile it and run the code i get an error

"Line 6725 (File C:UsersReederaDesktopProjectsPandasPandaV1.42.exe"):
Error:Only Object-type variables allowed in a "With" statement,

Any ideas why this is happening? cheers

Ant

Link to comment
Share on other sites

With necroposting an old topic? Please open a new one ;)

Hi!

My UDF: NetInfo UDF Play with your network, check your download/upload speed and much more! YTAPI Easy to use YouTube API, now you can easy retrive all needed info from a video. NavInfo Check if a specific browser is installed and retrive other usefull information. YWeather Easy to use Yahoo Weather API, now you can easily retrive details about the weather in a specific region. No-IP UDF Easily update your no-ip hostname(s).

My Script: Wallpaper Changer Change you wallpaper dinamically, you can also download your wallpaper from your website and share it with all!   My Snippet: _ImageSaveToBMPConvert an image to bmp format. _SciteGOTO Open a file in SciTE at specific fileline. _FileToHex Show the hex code of a specified file

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...