PDA

View Full Version : Question


Solitaire
07-11-2004, 05:10 AM
Is there any way to make a flash movie so that the sound is embedded in the file and when you click on it, the movie resets to the first and the sound plays. And than when you click it again the sound goes silent?

Solitaire
07-12-2004, 09:49 PM
Is this not possible or something? :(

daLavaTroll
07-19-2004, 09:16 AM
Import the sound.

As a musician, I then set it's properties to MP3/128/stereo and then set the linkage (apply a variable name).

I then do the _root.s = newSound(); _root.s.attachSound("your linkage name"); I'm not sure that syntax is 100%

Then do a onClipEvent(mouseDown)
on whatever object you want to trigger the sound.
Have a variable that holds it's play state like: _root.s.myPlay=true/false
if(_root.s.myPlay){
_root.s.myPlay=false;
_root.s.stop();
}
else{
_root.s.myPlay=true;
_root.s.start(0,999);///loops 999 times
}

By doing that, you have great control over sound in Flash.