Jump to content

Variable "Object"


Valley
 Share

Recommended Posts

I'm getting the following message when trying to run my program:

Variable must be of type "Object".

The strange thing is it was working a few days ago and I've not changed it, even the compiled .exe which is a few weeks old is now not working (was previously fine).

Its just a basic GUI which loads in a .swf movie, heres the code which I've gutted out, but still doesn't work :)

#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>


GUICreate("Interface - 720p", 1280, 720, -1, -1, $WS_POPUPWINDOW)
GUISetState(@SW_SHOW)
$Flash = ObjCreate("ShockwaveFlash.ShockwaveFlash")
$FlashObj = GUICtrlCreateObj($Flash, 0, 0, 1280, 720)
$Flash.Movie = @ScriptDir & '\' & 'test.swf'
$Flash.Loop = True

While 1
    
WEnd

Any help appreciated!

Edited by Valley
Link to comment
Share on other sites

  • 3 months later...

Hi!

I have a problem:

There are 2 types of flash.

01.swf - works well, 02.swf - can not stop.

#include <GUIConstantsEx.au3>

#include <WindowsConstants.au3>

$swffile = @ScriptDir & "\01.swf"

If Not FileExists($swffile) Then

Exit

EndIf

GUICreate("Flash", 800, 650)

$Button_1 = GUICtrlCreateButton("stop", 10, 630, 75, 20)

$Flash_Create = ObjCreate("ShockwaveFlash.ShockwaveFlash.10")

$Flash_Load_Obj = GUICtrlCreateObj($Flash_Create , 0 , 0 , 800, 620)

$Flash_Create.Movie = $swffile

$Flash_Create.Loop = True

GUISetState(@SW_SHOW)

While 1

$Msg = GUIGetMsg()

Switch $Msg

Case $GUI_EVENT_CLOSE

Exit

Case $Button_1

$Flash_Create.Stop()

$Flash_Create = 0

EndSwitch

WEnd

two_swf_files.rar

Please help.

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