Night | Snow

Using flashvars to pass parameter into flash file

Posted on: July 10th, 2009

The following little example shows how to pass values into a flash application.

The xhtml code looks like this:

<object  classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="580" height="650"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#
version=6,0,40,0">

<param name="src" value="flash.swf" />
<embed width="580" height="650" src="flash.swf" flashvars="para1=value1&para2=value2">
</embed>
</object>

This is how to use the passed values in the flash application:

x = stage.loaderInfo.parameters.para1;
y = stage.loaderInfo.parameters.para2;

Posted in Flash | Trackback Url

News

Martin Fischer said:

Client and partner of simra.ch

Wir können Simon Schärer als kompetenter und zuverlässiger Programmierer höchst weiterempfehlen. Er ist nicht nur ein guter Programmierer, sondern auch ein ausgezeichneter Designer.
Danke Developer’s Island

Follow us on Twitter

favorite

I get asked a lot - which SDK should we use for web programming? I recommend Netbeans

my toolbar

Simra GameMP3 playersubscribe to RSSMy delicious bookmarksFacebookTwitterE-mail

5 Responses to “Using flashvars to pass parameter into flash file”

RSS Feed Icon  Subscribe to comments follow-up

Bodyc's Avatar

2

Hi, Amazing! Not clear for me, how offen you updating your www.simra.ch. Bodyc

Tania's Avatar

4

Hi, Interesting, I`ll quote it on my site later.

1 Trackbacks/Pingbacks

Sales Planning

Leave a reply

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

Latest Tweet

loading...