-
I have a short movie with a sound track. Since the movie is set to loop, the soundtrack keeps repeating. I want to make a button to allow the viewer to stop the music. But since the movie loops, the STOP ALL SOUNDS command will not work because once the movie head comes round again, the sound starts playing again.
So -- I put the soundtrack in its own movie clip. Then I created a button and gave it the following commands:
tell Target ("SndMovie"){
go toAndStop (1);
}
The button should go to the movie clip [SndMovie] which is a sub-movie placed on the main timeline, and stop it from playing, which should stop the sound. However, this does not seem to work either.
Does anyone have any suggestions on what might be wrong with my action script commands. Or does anyone have another suggestion on how to STOP THE SOUND?
Thanks very much for your help. Metrov
-
Ok, I got my telTarget command to work. Must have done something wrong; don't know what; but it's working now as written in the previous post.
However, now I would like to create a button that will turn the sound BACK ON.
Any professional suggestions much appreciated.
Thank you, Metrov
-
Not sure if this is an ActionScript situation, but still hoping for suggestions.
Thanks, Metrov
-
Hi Metrov,
Here's the simplest way i can think of . . .
If I were you, I'd make the button graphic you're using be part of the sound movie clip.
In your clip, have frame 1 have a stop, and a stop all sounds. Start the sound in frame 2. At the frame where your sound file finishes (lets say it frame 100) make a frame action that makes it goto frame 2, therefore looping the clip.
Now, I'd have a button in frame one, who's action would be 'gotoAndPlay frame 2.' In the other frames, the action on the button would be 'gotoAndStop frame 1.' or something to that effect.
Best Regards,
Toyin Akinmusuru
-
Thanks so much for your suggestion. Sorry I didn't get back sooner; I was with a client all day. But you say put the button on the movie clip. But doesn't the button have to be on the main time line in order to work?
Thanks
-
Fortunately, the button does not have to be in the main timeline. in flash . . . you can put symbols within symbols within symbols . . you get the point. it works with everything . . . not only movie clips.
Best Regards,
Toyin Akinmusuru
-
Got it working! Thanks very much for your assistance. Best wishes, Metrov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|