3

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.

Magnus Smith
  • 5,895
  • 7
  • 43
  • 64
  • I should point out that the elements are often ignored, and you ought to set the flashVars within the JavaScript call to AC_FL_RunContent (if that is being used in your situation) by adding a new line amongst the other parameters: "flashVars", "greeting=Hello", – Magnus Smith Feb 22 '10 at 10:20

1 Answers1

6

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
  • 15,702
  • 1
  • 39
  • 39