Search code examples
apache-flexflexbuilderflashvars

Passing flashVars when testing in Flex Builder


I can pass values from HTML to a SWF when running my own HTML file, but I cannot see the way to do this within Flex Builder.

Creating my own HTML file with an extra param in the object tag works fine:

<param name="flashVars" value="greeting=Hello"/>

Then I can use this ActionScript to get the value in Flex:

blah = Application.application.parameters.greeting

But clicking the "run" button in Flex Builder to test my application uses HTML that is built by the compiler and cannot be altered. Is there a way to set up parameters to pass into the Project? Thanks.


Solution

  • Into your flex builder project you have normally a html-template directory containing an index.template.html file you can modify to suit your need.