...

View Full Version : get url variable to flash



alapimba
12-23-2008, 12:28 PM
Hi, i'm getting an url variable to flash using some javascript code.

Everything works fine and i get the variable to my dynamic text field but only on the root. if i put the text field on a movie clip it don't work anymore. Any clue on how to fix it?

i'm getting the variable with
<param name="movie" value="teste.swf'+document.location.search+'" />

on the flash i just write the variable name and it works.
something like http://www.kirupa.com/nome.html?var1=alapimba

and alapimba appears on my flash file.

What can i do to fix this? :(

gani
12-23-2008, 01:07 PM
From your movieclip you need to call the variable which is in the root like this _root.var1

alapimba
12-23-2008, 03:45 PM
From your movieclip you need to call the variable which is in the root like this _root.var1

and how can i assing that variable to the text field?
right now i just wrote the var name on the dynamic text field and it worked. no actionscript involved at all

itsallkizza
12-23-2008, 04:30 PM
Don't give the text field a var name. Instead give it an instance name. Then in your actions panel you can write:


textfield_name.text = "some text";
//or in your case
textfield_name.text = _root.my_input_variable;



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum