TechnicalArchitectureWorx

The (Unofficial) ITWorx Technical Architecture Blog

  • a

Passing Parameters to Flex

Posted by archworx on August 16, 2007

Adobe Flex is a great way to do Rich Internet Applications (RIA). When you need to pass a parameter the flex flash movie, you can do that simply by adding a line in the generated script tag.

...
} else if (hasRequestedVersion) {
    // if we've detected an acceptable version
    // embed the Flash Content SWF when all tests are passed
    AC_FL_RunContent(
        "src", "Main",
        "flashVars", "i=15&employeeName=xyz", // add this line with the vars you want to pass
        "width", "100%",

...

Then, in flex, you can access this parameter as follows:

application.parameters.i

2 Responses to “Passing Parameters to Flex”

  1. thks for this article …
    really it is helpfull, I was looking for the solution to get params into Flex, Thks

  2. Thank you! Really helped.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>