I’ve been unable to find information about the timing of loading Flash and JavaScript. I have a page that includes a JavaScript file and has a Flash SWF:
<script src="stuff.js"></script>
...
<object ...><embed ...>
...
<script>
// some code
</script>
The SWF calls a function defined in the JavaScript.
- Is it possible for the SWF to load before the JavaScript and be unable to find the function?
- Is it possible for “some code” to run before the SWF is loaded?
Instead of embed tag use http://code.google.com/p/swfobject/
also use ExternalInterface to interact with JS from AS3, for more samples please lokk here
http://blog.flexexamples.com/category/externalinterface/
Regards
Eugene