RSS
magnify
Home actionscript Trying to get variables into flash from the browser!
formats

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`

Wasn’t that easy?

 
 Share on Facebook Share on Twitter Share on Reddit Share on LinkedIn
No Comments  comments 

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© Copyright © 2012 · Web Development London UK · All rights reserved · Site hosted on the hsmoore.com network
By using the site and/or making use of any of our services you agree to our Terms and Conditions