[thelist] javascript with Flash

John Dowdell jdowdell at macromedia.com
Tue Dec 19 18:30:17 CST 2000


If you're trying to have JavaScript tell an object in the page a
user-determined value, then you've got a series of browser differences to
overcome:

--  Not all browsers let scripts talk to objects

--  Different browsers have different ways of finding objects in the page

--  You need to send the object a message it can understand, at a time it
can understand it

In your example, triggering the communication in the body.onLoad will
almost always fail, because the page loads before the objects on the page
get a chance to load.

If you know the value when the page is written, then there are easier and
more universal ways to talk with at least some objects in the page...
here's an overview:
"Different approaches to setting variables in a Flash movie"
http://www.macromedia.com/go/14253

In other situations, where you don't know the values when the page is
created but are relying on user choices when the page is displayed, then
it's easier to put all the interactivity in the SWF file itself. This lets
you avoid all the browser differences.

jd





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