Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Actionscript variable from PHP Query String

Status
Not open for further replies.

badley

Technical User
Dec 20, 2002
75
GB
Hi All,

I all rather new to the scripting side of flash, please can someone advise me on where I'm going wrong.

I'm send the variable 'id' via both the movie URL (value = "1001.swf?id=1001") and within the FlashVars (value = "id=1001").

I've been tearing me hear out try to get the actionscript to write the 'id' within a dynamic text instance box.

Please help and thanks in advance
 
Thanks, ok so I just use the following?

var id = _root.id;
TextFieldInstance.text = id;
 
Working!! So many sites seem to confuse me. Also have the stated the variable within the Var field of the textbox properties. If I were to use the 'id' within actionscript how do I go about using it?

for example:

on (press, release) {
getURL("menu.php?id=????");
}

Thanks for your help kennethkawamoto
 
How simple, sorry to take up your time with such trivia...

Much appreciated for the help
 
I've tried this exact method and it doesn't work. When I export the SWF I get the error "Access of undefined property id" and then when viewing the SWF, nothing appears?
 
That sounds like an AS3 error message. Accessing variables passed from HTML is very different in AS3 - it is done through [tt]parameters[/tt] property of [tt]LoaderInfo[/tt] class.

Kenneth Kawamoto
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top