Valley Posted November 26, 2009 Posted November 26, 2009 (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 November 26, 2009 by Valley
Richard Robertson Posted November 26, 2009 Posted November 26, 2009 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.
Valley Posted November 26, 2009 Author Posted November 26, 2009 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
ynbIpb Posted March 2, 2010 Posted March 2, 2010 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 ExitEndIfGUICreate("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 = TrueGUISetState(@SW_SHOW)While 1 $Msg = GUIGetMsg() Switch $Msg Case $GUI_EVENT_CLOSE Exit Case $Button_1 $Flash_Create.Stop() $Flash_Create = 0 EndSwitchWEndtwo_swf_files.rarPlease help.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now