-
Hi, I have a movie with a button to turn the sound off. How do I enable this button to turn the sound back on? The control panel only allows me to use "On Press" once and I don't see a "start all sounds". Also, if it is possible to turn the sound back on can I swap the button image out when toggled from the on/off.
Thanks Ahead
I wasn't sure if this should be in the sound or scripting board. Sorry if this is wrong.
-
There would be several ways to do this, here's one of them
Create a seperate movie with 2 frames, 1 with your sound file, one with the action stop all sounds. Have your button target the "sound" movie with the action play.
Hope this helps.
-
Hi Generro, thanks for the reply. I created a new scene "sound" with two frames, one with the sound and the other with a stop all sounds action. I then went back to the original scene and gave the button these commands: on press, begin target "sound", play. I think I was a little confused on this part, could you explain further, please.
Thanks, Dan P.
-
-
-
No problem Dan, here we go )
First, create a new "movie", a new symbol that has the behavior of a movie. In this new "movie" place your sound in frame 1, loop it as many times as you feel are neccesary. In frame 2 set the properties with an action to stop all sounds. Both frames must also have the action "stop".
Ok, now we have a new "movie" in our library that contains our sound. Back on the main stage place this "sound" movie wherever you want your sound to start. I would suggest you place it on it's own layer called "sound" to make it easier to keep track of.
Once you drag the sound movie onto the stage a small icon will appear on the stage to represent the sound movie, right click on it and bring up the properties, we need to give the movie an "instance" name. Name the instance "sound", this will allow you to "tell target" "sound" to "play".
So...back to your button )
You need to set you button to "tell target". Your "target" is the "instance" "sound". You want to tell this target to "play". This will cause the "sound movie" to advance to frame 2 which has the actions stop all sounds, stop. Clicking the button again will tell the target to play again, causing the sound movie to go to frame 1, play the sound and stop. Each time you click the button you will move the sound movie between frames 1 and 2 causing the sound to start and stop )
The sound should not be placed anywhere else in your movie, only in the "sound movie" which you've placed on the stage at the proper time. This is placing movies within movies and utilizing the tell target command to control the element you want.
Remember the tell target relies on an instance name, it doesn't target movies, it targets instances.
I hope this helps )
-
Now if I can figure out these damn happy face things I'LL be ok.
-
This may help with the tell target:
On(Release,Release Outside)
Begin Tell Target ("sound")
Play
End Tell Target
End On
-
Thanks for the help, unfortunately each time that sound file is stopped and started it goes back to the beginning of the loop. I am looking for a file that will start the sound back up at the point were the main movie has reached. I am not sure if this is possible, but it keeps the movie in rhythm and fades the loop at the end of the movie, even if the viewer decides to stop and start the sound. Here is the file for reference, I can only figure out how to start it from the beginning, http://clients.brainbug.com/outrider...on2/flash.html
Thanks
-
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
|