Jump to content

GUICtrlSetPos doesn't work on Shockwave Object


 Share

Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 11 months later...

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