Jump to content
Sign in to follow this  
DeeRiee

GUICtrlSetPos doesn't work on Shockwave Object

Recommended Posts

DeeRiee

Well, im trying to make an object. It's a ShockwaveFlash.ShockwaveFlash.

I tried to resize it using GUICtrlSetPos. But always return an error.

Here's my script

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

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("flash", 379, 244, 216, 151)
$swfObj = ObjCreate("ShockwaveFlash.ShockwaveFlash")
$swfActiveX = GUICtrlCreateObj($swfObj, 100, 10, 190, 100)
$Button1 = GUICtrlCreateButton("Resize", 104, 176, 177, 41, 0)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $Button1
            $resize = GUICtrlSetPos($swfObj, 0, 0, 230, 200); why this doesnt work on shockwaveflash object?
            If $resize = 0 Then
                MsgBox(0,"error","failed to resize")
            Else
                MsgBox(0,"success","resizing successfull")
            EndIf
        Case $GUI_EVENT_CLOSE
            Exit
    EndSwitch
WEnd

Thanks before.. :D


Sorry 4 Bad English, I'm Indonesian...I'm really need 'Translator' for helping me posting in this forum (http://deeriee.wordpress.com)

Share this post


Link to post
Share on other sites
toxicvn

this is a example:

$GUI = GUICreate("Age of War [AutoIt Var Editing]", 670, 560, -1, -1)

$oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")

$oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450)

With $oGame

.bgcolor = "#000000"

.Movie = "http://207.218.234.34/ageofwarupdate1MzYx.swf"

.Loop = True

.ScaleMode = 2

.wmode = "Opaque"

EndWith

$Money = GUICtrlCreateInput("Money", 10, 470, 100, 20)

$SetMoney = GUICtrlCreateButton("Set Money", 120, 468, 100)

$TechLevel = GUICtrlCreateInput("Tech Level (1 - 5)", 10, 500, 100, 20)

$SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 498, 100)

$XP = GUICtrlCreateInput("XP", 10, 530, 100, 20)

$SetXP = GUICtrlCreateButton("Set XP", 120, 528, 100)

GUISetState()

While 1

$nMsg = GUIGetMsg()

Select

Case $nMsg = -3

Exit

Case $nMsg = $SetMoney

$Read_Money = GUICtrlRead($Money)

$oGame.SetVariable("cash", $Read_Money)

Case $nMsg = $SetTechLevel

$Read_TechLevel = GUICtrlRead($TechLevel)

$oGame.SetVariable("tech_level", $Read_TechLevel)

Case $nMsg = $SetXP

$Read_XP = GUICtrlRead($XP)

$oGame.SetVariable("xp", $Read_XP)

EndSelect

WEnd

Share this post


Link to post
Share on other sites
toxicvn

this is a example:

$GUI = GUICreate("Age of War [AutoIt Var Editing]", 670, 560, -1, -1)

$oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")

$oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450)

With $oGame

.bgcolor = "#000000"

.Movie = "http://207.218.234.34/ageofwarupdate1MzYx.swf"

.Loop = True

.ScaleMode = 2

.wmode = "Opaque"

EndWith

$Money = GUICtrlCreateInput("Money", 10, 470, 100, 20)

$SetMoney = GUICtrlCreateButton("Set Money", 120, 468, 100)

$TechLevel = GUICtrlCreateInput("Tech Level (1 - 5)", 10, 500, 100, 20)

$SetTechLevel = GUICtrlCreateButton("Set Tech Level", 120, 498, 100)

$XP = GUICtrlCreateInput("XP", 10, 530, 100, 20)

$SetXP = GUICtrlCreateButton("Set XP", 120, 528, 100)

GUISetState()

While 1

$nMsg = GUIGetMsg()

Select

Case $nMsg = -3

Exit

Case $nMsg = $SetMoney

$Read_Money = GUICtrlRead($Money)

$oGame.SetVariable("cash", $Read_Money)

Case $nMsg = $SetTechLevel

$Read_TechLevel = GUICtrlRead($TechLevel)

$oGame.SetVariable("tech_level", $Read_TechLevel)

Case $nMsg = $SetXP

$Read_XP = GUICtrlRead($XP)

$oGame.SetVariable("xp", $Read_XP)

EndSelect

WEnd

Share this post


Link to post
Share on other sites
DeeRiee

I want to set the object size not the variable...


Sorry 4 Bad English, I'm Indonesian...I'm really need 'Translator' for helping me posting in this forum (http://deeriee.wordpress.com)

Share this post


Link to post
Share on other sites
ulmstefan

Well, solved by myself...

I've the same problem, how did you solve it?

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.