Reputation:
I was reading about Flex- JavaScript communication via ExternalInterface.
But I had a doubt, it said that the javascript code should be written in the HTML file of the application ?
Now which is this HTML file ?
Is it the index.template.html
file per project or the HTML file created per MXML application
?
Upvotes: 0
Views: 147
Reputation: 6715
this pages describe external interface very well. Most important thing to not forget is
<param name="allowScriptAccess" value="sameDomain" />
And for better flash embeding, use http://code.google.com/p/swfobject/ .
Upvotes: 0
Reputation: 21371
Yes, or if it's a lot of javascript, you could externalize it by including a script tag in the index.template.html file. The index.template.html file is used to generate the index.html files in bin-debug and bin-release folders.
Upvotes: 0
Reputation: 3013
You should better use the index.template.html
, since this is the file used as a template for the HTMLs generated for each MXML application. Otherwise a simple clean on the project might delete the code you've added to the HTML file created per MXML application.
Upvotes: 1