[thelist] javascript with Flash

John Dowdell jdowdell at macromedia.com
Wed Dec 20 18:31:51 CST 2000

I'm getting out of my depth here, but if you'd like JavaScript to tell
Flash something as soon as it starts, then it's true that having Flash tell
the browser "I'm ready!" would be better than the browser talking as soon
as it's ready.

There's another complication, though, in that some of the browsers which
support script/object intercommunication don't like to ping-pong messages
back and forth... if the Flash applet sends a message to JavaScript which
is handled by sending a message back to Flash, then some browsers will balk
at that rapid back-and-forth.

In such a case, the following sequence would work:
1)  Flash applet starts, sends "i'm ready!" message to JavaScript/VBScript
2)  The scripts catch the event and set a timeout to call another function
in the page
3)  The timeout function then passes variables back to the applet

You'd still be relying on the browser to let scripts and objects talk
together, though... IE/Mac, Netscape 6, Opera, Java-disabled Netscape and
so on won't do this.

I don't know where you're getting your variable values from, but it's
simpler and more universal to pass this in through the URL or through the
HTML tags, than through JavaScript. The browsers are good for simpler
displays, but it's really a hassle to do advanced things with those various
engines distributed out there. Did that previous Flash technote on
variable-passing spark any interest in alternate methods at all...?


John Dowdell, Macromedia Tech Support, San Francisco CA US
Search technotes: http://www.macromedia.com/support/search/
Offlist email risks capture by the spam filters. I may not see your
email if it's not on the list. Private one-on-one email options are
available via Priority Access: http://www.macromedia.com/support/

More information about the thelist mailing list