tags:

views:

100

answers:

2

I want to use a flash movie in another movie, so I import the desired swf into the library. Yet, the swf needs some additional configuration that can be passed as flash vars. How can I specify the flash vars?

A: 

You should be able to output your flash vars as part of your embed code. Check out this link, should tell you everything you need to know.

Click here

Then you refer to these vars by key name in your action script like so:

_root.keyname

Also, why not dynamically load your swf into your flash movie instead of including it in your library?

Acorn
A: 

If you load the swf file into your Flash movie at runtime, you should be able to set the FlashVars by appending them to the URL of the swf you're loading in…

path/to/my.swf?var1=foo&var2=bar

The variables you've added to the URL should then be accessible as if you had set them in the flashVars property of your embed code.

joshbuhler
This is a common method, but I've actually seen an issue doing it this way which involved the value of a var being outside of the string length limitation. We used the flashvars parameter to include these long string vars properly.
Acorn