Jump to content

Getting the Value of a Variable in a flash game.


AlmarM
 Share

Recommended Posts

Hi,

I think the title says enough.

My script

$GUI = GUICreate("Test", 620, 250, -1, -1)
$oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash.1")
$oGUIGame = GUICtrlCreateObj($oGame, 10, 10, 600, 200)
$Skip = GUICtrlCreateButton("Skip Word", 10, 215, 150, 30)

With $oGame
    .bgcolor = "#000000"
    .Movie = "http://play4traffic.com/game.swf"
    .ScaleMode = 2
    .wmode = "Opaqeu"
    .Loop = True
EndWith

GUISetState()
While 1
    $nMsg = GUIGetMsg()
    Select
    Case $nMsg = -3
        Exit
    Case $nMsg = $Skip
        $oTest = $oGame.GetVariable("woorden")
        MsgBox(0, "", $oTest)
    EndSelect
WEnd

The source from the flash game. (Its about 'woorden')

CODE
// [Action in Frame 3]

woorden = new Array("ambtelijk", "ambtenaar", "advertentie", "applet", "attachment", "analoog", "abnormaal", "academie", "alcohol", "aanvallen", "actrice", "applicatie", "allerlei", "allemaal", "abstract", "adopteren", "advocaat", "bericht", "bibliotheek", "baan", "bevredigend", "betrekking", "bedroevend", "buurman", "bankbediende", "batterij", "beurs", "broadcast", "bookmarks", "browser", "beademen", "beantwoorden", "bobslee", "cabaret", "creditcard", "cabinepersoneel", "computer", "cyberspace", "cookie", "combikaart", "combinatie", "ceintuur", "celebrity", "communicatie", "communiceren", "conceptie", "cruisecontrol", "circuit", "discussie", "data", "database", "deactiveren", "debat", "draadloos", "dynamiek", "dynamo", "display", "dochter", "document", "diamant", "diskdrive", "draaiorgel", "dolfijn", "digitaal", "download", "documentaire", "drempel", "diabetes", "ethernet", "email", "encryptie", "eten", "enter", "echo", "encyclopedie", "evacueren", "evangelie", "examen", "examenvak", "examinator", "freelance", "frequentie", "functioneren", "functionaris", "functie", "fiasco", "forum", "flash", "fiberglas", "goochelaar", "geld", "gokken", "gaspedaal", "goud", "geest", "groen", "gewichtig", "gemeente", "glasbak", "greenpeace", "gezamelijk", "gram", "gemeen", "hacker", "handwerk", "hardware", "harddisk", "hout", "helpen", "handig", "hotmail", "hosting", "help", "html", "homepage", "hypertext", "hyperlink", "ijverig", "identificatie", "instrument", "intranet", "idool", "identiteit", "inaccuraat", "inademing", "insect", "ijdel", "jaloers", "jaloezie", "jaarverslag", "jaarcijfers", "job", "jubileum", "jury", "juweel", "juwelier", "konijn", "kabinet", "kompas", "keyboard", "kleermaker", "kussen", "kangaroo", "keuken", "koning", "koningin", "kathedraal", "katholiek", "kantoor", "laboratorium", "labyrint", "lanceren", "landarbeid", "liefde", "landbouw", "luiaard", "luidruchtig", "luidspreker", "loterij", "leeuw", "lampenkap", "lusteloos", "lustobject", "mes", "matchpoint", "mechanisch", "machine", "medicijn", "muis", "monster", "marathon", "magie", "memoblok", "monitor", "mousepad", "modem", "mobiel", "naakt", "nagels", "netwerk", "nachtclub", "nieuwsbericht", "nieuwsgroep", "nuance", "nucleair", "nucleair", "ober", "omroepen", "online", "oase", "oceaan", "octopus", "oranje", "orgel", "octrooi", "opium", "oliebol", "onaandoenlijk", "parallel", "portemonnee", "pictogram", "programma", "paraplu", "professioneel", "politiek", "politie", "proberen", "proefles", "professor", "piano", "podium", "provincie", "protestant", "processor", "quote", "query", "quotering", "raadhuis", "raadsel", "regen", "rat", "ring", "rennen", "rubriek", "robijn", "spel", "snel", "sleutel", "spiegel", "satelliet", "sociaal", "solliciteren", "sigaar", "symbool", "software", "symfonie", "symmetrisch", "sympathiek", "switch", "swingen", "tuinstoel", "tatoeage", "tango", "telefoon", "toilet", "traceren", "thailand", "theater", "upload", "uitvoering", "uranium", "uniform", "universiteit", "uitzenden", "uitbeelden", "vliegtuig", "vuurwerk", "vocabulaire", "vaccinatie", "valentijn", "vallei", "vampier", "viool", "voertuig", "virtueel", "vlinder", "wachtwoord", "woordenboek", "water", "wapen", "wolf", "wurm", "webdesign", "windows", "winstgevend", "winstmarge", "wonder", "woordenschat", "xenograaf", "xenobiotisch", "yoga", "yoghurt", "zaadcel", "zebrapad", "zedendelict", "zichtbaar", "ziek", "ziekenhuis", "ziekenfonds");

aantalwoorden = woorden.length;

index = Math.round(Math.random() * (aantalwoorden - 1));

typen = woorden[index];

_root.woord.edit = typen;

woord._x = 0;

woord._y = 85.800000;

done = false;

i++;

If you look into my script. I want to get the value of 'woorden' when Skip Word is pressed.

This is my error

C:\Documents and Settings\@UserName\Bureaublad\Test File.au3 (21) : ==> The requested action with this object has failed.:
$oGame.GetVariable("woorden")
$oGame.GetVariable("woorden")^ ERROR

Can anyone help me?

AlmarM

EDIT: Typo

Edited by AlmarM

Minesweeper

A minesweeper game created in autoit, source available.

_Mouse_UDF

An UDF for registering functions to mouse events, made in pure autoit.

2D Hitbox Editor

A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.

Link to comment
Share on other sites

  • 1 year 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...