Jump to content

Flash not displaying, but no errors


Champak
 Share

Recommended Posts

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
Link to comment
Share on other sites

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.

Link to comment
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.

Link to comment
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?

Link to comment
Share on other sites

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.

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...