Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | Re: sound streaming |
From: | Colin Moock |
Date: | Fri, 24 Apr 1998 15:35:30 +0100 |
Sorry Jim, just saw your other post...didn't know you don't do much
JavaScript, so here's the rest of what you'll need in your page:
1) In your EMBED statement, name your first movie "firstmovie"
2) In the HEAD of your page, put:
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
//This function listens for FSCommands from your first movie...
function firstmovie_DoFSCommand(command, args){
if(command=="setbuttons"){
var destframe = parseInt(args)
setbuttons(destframe)
}}
***PUT SCRIPT I SENT BEFORE HERE***
//-->
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
<!--
// Map VB script events to the JavaScript method - Netscape will
ignore this...
// Since FSCommand fires a VB event under ActiveX, we respond here
Sub buttons_FSCommand(ByVal command, ByVal args)
call buttons_DoFSCommand(command, args)
end sub
-->
</SCRIPT>
3) In your first movie, make the action on the button have a Network
URL of:
FScommand:setbuttons
and in the "Target" put the number of the frame you want your sound
movie to move to.
4) I just noticed something I forgot to change below. Fix the last line
in the first script I sent:
This:
> bm.GotoFrame(framenumber);
Should read:
soundmovie.GotoFrame(framenumber);
That's most of what you'll need. Might be some typos etc, but you
should be able to take it from there...
Cheers,
Colin
>Your JavaScript would look something like this:
>//FSCommand passes (command,args). We catch
>//them to call this function and
>//to specify which frame the sound movie
>//should jump to. Saves hard-coding
>function setbuttons(framenumber){
> //Refer to the embedded movie as "soundmovie", set using
>slightly different syntax
> //depending on the browser.
> var InternetExplorer = navigator.appName.indexOf("Microsoft")
>!= -1;
> var soundmovie = InternetExplorer ? window.buttons :
>window.document.buttons;
> //Ask Flash how much for the amount of the movie already
>loaded.
> var pl = soundmovie.PercentLoaded();
> //Wait until the whole movie is loaded.
> while(pl < 100){
> pl = soundmovie.PercentLoaded();
> }
> //Now that enough of the movie is safely loaded,
> //send it to the desired frame in the timeline.
> //Use alert for testing purposes.
> alert('Now setting buttons frame to: ' + (framenumber + 1));
> bm.GotoFrame(framenumber);
>}
------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-managershocker [dot] com. Problems to: ownershocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-managershocker [dot] com
Replies
Event or Start?, Marcantonio Magnarapa
Replies
RE: Wait for frame, waiting longer., Andrew Timberlake
Re: Wait for frame, waiting longer., Dave Smith
plug-in version?, Dave Smith
Re: plug-in version?, John Croteau
Re: plug-in version?, Dave Smith
Re: plug-in version?, John Croteau
Re: plug-in version?, Dave Smith
Re: plug-in version?, Jim Curry
Re: plug-in version?, Dave Smith
loading, Jim Curry
sound streaming, Jim Curry
Re: sound streaming, Colin Moock
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]