Using a server side script for the html template and setting Flash var, you can pass name-value pairs to a Flex app.
On the html template
“FlashVars”, “yourparam=yourparamvalue&MMredirectURL=”+MMredirectURL+’&MMplayerType=’+MMPlayerType+’&MMdoctitle=’+MMdoctitle+”",
“flashvars”,’yourparam=true&historyUrl=history.htm%3F&lconid=’ + lc_id + ”,
On the flex code, we reference the param like this
String ourParam = Application.application.parameters.yourparam;
References:
- http://blog.flexexamples.com/2007/08/07/grabbing-flashvars-from-the-embedding-html-template/#more-64
- http://flexblog.faratasystems.com/?p=99
#1 by Nash on June 4, 2009 - 6:19 pm
Quote
few more ways to pass variables to flex
http://yasob.blogspot.com/2009/05/accessing-http-...
#2 by kennethteo on June 4, 2009 - 6:26 pm
Quote
@Nash, it is based on the same idea but an enhanced one where u use a script to create dynamic variables…
Having said that, Thanks for providing the link onto this post!!