The (Unofficial) ITWorx Technical Architecture Blog

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
        "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:



3 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.

  3. laxmikanth said

    I have an .net page where I get the user id from who’s logged in.
    Now I need to pass this user id to a flex application. that runs in an page as a .SWF
    How can I get this user id in a variable in my flex application?
    Waiting for ur positive response.
    Laxmikanth k

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: