views:

12

answers:

1

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.

  1. Is it possible for the SWF to load before the JavaScript and be unable to find the function?
  2. Is it possible for "some code" to run before the SWF is loaded?
+1  A: 

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

Eugene
using swfobject, you can controll via JS the time to load flash object.
Eugene
While this doesn't answer the question, at least by using swfobject I know the browser will use the rules for loading JavaScript, which are documented and I understand.
NateS