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
Bookmark and Share

Tags: , , , ,