views:

350

answers:

1

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.

+3  A: 

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.

Patrick
@Magnus: Here's your answer.
Robusto
Aha! I was editing the html file in the bin-debug folder (which gets overwritten on compile). Thanks Patrick!
Magnus Smith
You're welcome :)
Patrick