Trying to get variables into flash from the browser!

Ever wondered how to get variables from an html page to a flash element?

Well, it’s quite easy using the following actionscript 2 example:

I use javascript to embed my flash elements:

<embed src="somefilename.swf?varname=varvalue&vartwo=var2value" width="550" height="400"></embed>

Now in Flash I can just call:

_root.varname and it will give us `varvalue` _root.vartwo will give us `var2value`
Code language: JavaScript (javascript)

Wasn’t that easy?

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments