Sign in to follow this  
Followers 0
Champak

Flash not displaying, but no errors

9 posts in this topic

#1 ·  Posted (edited)

Im running the following test example and the flash is not displaying. But I'm not getting an error either. I can play flash fine on the internet. Any idea?

#include <GUIConstants.au3>
Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.11")
GUICreate ("Flash", 820, 600, -1, -1)
$GUIActiveX    = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580)

;MsgBox(0,0,@ScriptDir)
With $oRP
    .bgcolor = "#000000"
    .Movie = @WindowsDir & '\logo2.swf';
    .ScaleMode = 2
    .Loop = True
    .wmode = "Opaque"
    .FlashVars = ""
     .Playing = True
EndWith

GUISetState ()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

$oRP = 0
GUIDelete ()
Exit

I already tried changing ShockwaveFlash.ShockwaveFlash.11 to ShockwaveFlash.

I have the shockwave registry in HKEY_LOCAL_MACHINESoftware

Yes the flash is in the proper directory, and I've tried other flash files.

Edited by Champak

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Though I don't know why it's not working for you, but your code IS working for me, just with a different flash value.

I even downloaded the 'kingdom-rush-12141.swf' to my machine to test it locally. This also worked.

Global $sURL = "http://cache.armorgames.com/files/games/kingdom-rush-12141.swf"
Global $sLocalURL = @ScriptDir & "\flash_file.swf"

#include <GUIConstants.au3>
Global $oRP = ObjCreate("ShockwaveFlash.ShockwaveFlash.11")
GUICreate ("Flash", 820, 600, -1, -1)
$GUIActiveX    = GUICtrlCreateObj( $oRP, 10, 10 , 800 , 580)

;MsgBox(0,0,@ScriptDir)
With $oRP
    .bgcolor = "#000000"
    .Movie = $sURL
    .ScaleMode = 2
    .Loop = True
    .wmode = "Opaque"
    .FlashVars = ""
    .Playing = True
EndWith

GUISetState ()

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    EndSelect
WEnd

$oRP = 0
GUIDelete ()
Exit
Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

That works for me as well, however, once I put it as a local file, it wont display. Is it working for you as a local file, or just through the URL?

Share this post


Link to post
Share on other sites

That works for me as well, however, once I put it as a local file, it wont display. Is it working for you as a local file, or just through the URL?

 

I saved 'kingdom-rush-12141.swf' to my @ScriptDir as 'flash_file.swf', and it worked as well.


Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

I was wrong it was in the wrong directory. My usb and main drive have the same file structure and name. The script was on the USB and the flash was on the main. Thanks.

One more thing, the flash doesn't start automatically. I assume "playing = true" would make it start, it seems not so. How do I make it automatically start?

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

I'm not sure.

Try autoplay = 1 or autostart = 1.

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Share this post


Link to post
Share on other sites

Yeah, I already tried this, no luck.

Share this post


Link to post
Share on other sites

#8 ·  Posted (edited)

I looked up the attributes and it states "play = true" should accomplish this, but it causes an error in the script. Oddly, I don't see "playing = true" in the list of attributes.

Edited by Champak

Share this post


Link to post
Share on other sites

#9 ·  Posted (edited)

I took out "playing = true" and it starts automatically now. Thanks.

Edited by Champak
1 person likes this

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  
Followers 0