Search code examples
apache-flexflashvars

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"/>       
    <param name="movie" value="$!SRC"/>
    <embed src="$!SRC" width="$!WIDTH" height="$!HEIGHT"/>
</object>

any ideas why this is not happening for me?


Solution

  • 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"/>       
        <param name="movie" value="$!SRC"/>
        <embed src="$!SRC" width="$!WIDTH" height="$!HEIGHT" flashVars="maximizeUrl=http://maximizeUrl"/>
    </object>
    

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