tags:

views:

550

answers:

3
+1  Q: 

flashVars flex3

hi im trying to using flashVars however for some reason there not getting sent to my flex app.

Im embedding my object in a velocity file and here is the object embed code;

<object width="$!WIDTH" height="$!HEIGHT">
 <param name="flashVars" value="maximizeUrl=http://maximizeUrl"/&gt;       
    <param name="movie" value="$!SRC"/>
    <embed src="$!SRC" width="$!WIDTH" height="$!HEIGHT"/>
</object>

any ideas why this is not happening for me?

+2  A: 

I assume you're having problems with Firefox, which ignores the object tag, and uses the embed tag instead. You need to add the flashvars parameter as an attribute there as well:

<object width="$!WIDTH" height="$!HEIGHT">
        <param name="flashVars" value="maximizeUrl=http://maximizeUrl"/&gt;       
    <param name="movie" value="$!SRC"/>
    <embed src="$!SRC" width="$!WIDTH" height="$!HEIGHT" flashVars="maximizeUrl=http://maximizeUrl"/&gt;
</object>

Alternatively, you could use SWFObject to dynamically generate the embedding code.

David Hanak
A: 

I agree with the answer from David, use SWFObject or prefreably use the code that comes with flexbuilder. check out my answer for this question http://stackoverflow.com/questions/452402/how-to-make-javascript-talk-to-flash-ac3-embedded-with-swfobject-2-0#461727

kenneth
A: 

thanks, did the trick adding the flashvars to the embed

combi001