Jump to content
Sign in to follow this  
nowayhome2

make a gui that loads a local swf file?

Recommended Posts

nowayhome2

im trying to make a gui that loads a single swf into it kinda putting an ie shell into your form except just make it a swf?

Share this post


Link to post
Share on other sites
Authenticity

#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

Share this post


Link to post
Share on other sites
electrico

Thank you very much and Happy New year!!!

Share this post


Link to post
Share on other sites
Annonyreeder

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

Share this post


Link to post
Share on other sites
Nessie

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

Share this post


Link to post
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
Sign in to follow this  

×