Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: FLASH: Talking to Flash from JavaScript
From: Rebecca Lovelace
Date: Tue, 8 Feb 2000 21:19:59 GMT

I've been trying to get a handle on using JavaScript with Flash.
I tried doing the Quote Clock tutorial from Flash 4 Magic, but it only works
in IE.
I figured it would be a good exercise to try to get it to work in Netscape
Navigator.
I have gotten it very close, but I'm missing some key element. I got it to
almost work on my Mac, but it manages to crash into MacsBug (latest Flash
player, Netscape 4.7). I tried it on another Mac that doesn't have MacsBug
installed, Netscape 4.5, and it gave me an error that the Flash movie wasn't
loaded.

Here's what I've tried:
In JavaScript there is a function setflashclock() declared in the <HEAD>
portion of the HTML.
I'm just making it work with Netscape so for the time being I'm ignoring IE.
I have
var clockmovie = window.document.embeds[0]; (I also tried doing it like
window.document.clock;)
Then
clockmovie.SetVariable("varname", value); etc.

In the <BODY> portion I have
onLoad="setflashclock();"
and I added in the <EMBED> tag
name = "clock" swLiveConnect="true"

Shouldn't the onLoad be sufficient for the movie to be fully loaded? Do I
need to add a FSCommand to the Flash movie instead?

Any other tips?

Thanks,

Rebecca Lovelace

P.S. If I get it to work, I'll post the code so that anyone out there with
Flash 4 Bible and Netscape can do this tutorial!!


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California

-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]