Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Netscape 7: Javascript won't control movie.

Status
Not open for further replies.

lectro

Programmer
Mar 13, 2003
2
US
I'm trying make my movies work with Netscape 7.
To this end, I've created an incredibly simple looping swf.
In my <object> tag, I've told the player not to play the movie automatically when it loads.
My next step is to have Javascript use the play() method to start the movie. I'm assuming that if I can do this, everything else will fall into place.

The behavior that I'm seeing is that the object objFlash is assigned the object, put the play() call makesNS grumble, &quot;objFlash.play is not a function&quot;.

Any help would make me very happy.

Here's my code (all of it):

<HTML><!--Loads a Flash movie with play=false, then plays it using javascript-->
<HEAD>
<TITLE>AAARRRGGHH!!!!</TITLE>

<script language = &quot;javascript&quot;>
objFlash = new Object;
function init() {
objFlash = document.myFlash;
alert(objFlash);
objFlash.play();
}

</script>

</HEAD>
<BODY bgcolor=&quot;#FFFFFF&quot;>

<object type=&quot;application/x-shockwave-flash&quot; data=&quot;testmov.swf&quot; width=&quot;366&quot; height=&quot;142&quot; id=&quot;myFlash&quot;>
<param name=&quot;play&quot; value=&quot;false&quot;>
<param name=&quot;swliveconnect&quot; value=&quot;true&quot;>

<script language = &quot;javascript&quot;>
init();
</script>

</BODY>
</HTML>
 
I've scrapped NN from my machine a long time ago, so can't say if NN7.0 would work on this, but I used to successfully use Flash methods with NN4.76 and it has allways work for me.

Regards,

oldman3.gif
 
The only diffence I see in this is that it uses window.document.movie.play() instead of document.movie.play(), which also causes the same behavior. I've also tried using window.movie.play() just for fun.

I'm not having problems with NS4.7 since this use the embed tags.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top