Getting a variable into flash

hi all,
i’ve done a search for this on the forum but havnt found what i needed.
i have an html drop down box on my html page. i also have my flash movie on the same page. i’ve got an onChange handler on my drop box which calls a functions that sets a variable. how can i get that variable into my movie without having to reload the page?
hope that makes sense.

  • gBay

you can do it with javascript.

window.document.MOVIEID.SetVariable(“VARIABLE”, “VALUE”);

where MOVIEID is the id specified in the “id” attribute of the object tag for your flash movie.

hi, thanks for answering my question, but…
but will i be able to keep changing the value of the variable within the movie without having to reload the page?

  • gbay

you can change it all you like without reloading.

the only problem is it won’t work in all browsers.

change the variable values without reloading page? thats wicked! which browsers will it not work in? if its fine on ie4 / ns 4.7 and above then thats fine, if not, then thats a problem. Why wouldnt it work in some browsers? do some not support javascripts SetVariable command?
thanks

  • gBay

here’s the macromedia technote.

http://www.macromedia.com/support/flash/ts/documents/java_script_comm.htm

it pretty much spells everything out.

ah yes! just read the technote. told me all i needed to know.
cheers for the direction!

  • gBay.