Jump to content

Recommended Posts

Posted (edited)

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
Posted

Have you had any OS updates? It's possible that you don't have permission to create the object now.

Check @error after the ObjCreate call.

Also, it's not a good idea to show the GUI before adding all the controls. Add everything and then show it.

Posted

Ah, I updated to the new Flash player beta for increased HD video performance the other day, which seems to have screwed with IE's Flash. Just read up on the COM Object info which helps explain a bit.

Thanks for the help

  • 3 months later...
Posted

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.

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
  • Recently Browsing   0 members

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