JavaScript to Flash with layers

Hello everyone,

I’m trying to make 2 movies on 2 different layers talk to each other. :puzzled:
I can make my flash movie start a js function from my HTML page but I can’t make that function talk to the second movie.

In details…

In a html page, I have embeded a movie called movie1.swf.
On a layer on that same page, I have an other movie called movie2.swf.

On a frame in my movie1.swf, I have a getURL calling a function.
getURL(‘javascript:byebye()’);

The function called in the HTML page:
<script language=“JavaScript” type=“text/JavaScript”>
<!–
function byebye(){
[INDENT]window.document.movie2.main.goToAndStop(“label_called_do_something”);[/INDENT]
}
//–>
</script>

Here’s how the movies are EMBEDED in the HTML page:

<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0” name=“movie2” width=“900” height=“250” id=“movie2”>
[INDENT]<param name=“movie” value=“movie2.swf” />
<param name=“quality” value=“high” />
<param name=“name” value=“movie2” />
<param name=“swLiveConnect” value=“true” />
<param name=“LOOP” value=“false” />
<embed src=“movie2.swf” width=“900” height=“250” loop=“false” quality=“high” pluginspage=“http://www.macromedia.com/go/getflashplayer” type=“application/x-shockwave-flash” name=“ant2” swLiveConnect=“true”></embed>[/INDENT]
</object>
</div>

<object classid=“clsid:D27CDB6E-AE6D-11cf-96B8-444553540000” codebase=“http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0” width=“300” height=“250”>
[INDENT]<param name=“movie” value=“movie1.swf” />
<param name=“quality” value=“high” />
<param name=“LOOP” value=“false” />
<embed src=“movie1.swf” width=“300” height=“250” loop=“false” quality=“high” pluginspage=“http://www.macromedia.com/go/getflashplayer” type=“application/x-shockwave-flash”></embed>[/INDENT]
</object>

Any ideas why the function doesn’t make the movie2.swf go to main.goToAndStop(“label_called_do_something”) ??? :h:

Any ideas will be appreciated…

Thanks! :thumb:

neuhaus3000