OK, lets see if I can explain this. First of all I'm looking for a way to stop all sounds then start them again. This is how my FLA file is set up.
On the main time line the mp3 called Sound_X_7 is placed on frame 68. When the movie is viewed it starts playing automatically. There is a button to start and stop *ALL* the sounds in the movie.
The sound button is set up like this.
On the main time line there is an instance of a movie called Sound_8. This is the "on and off button." It has no instance name or actions attached to it.
Inside of Sound_8
The movie clip has 2 layers.
Top Layer
There is movie clip called Sound_7 it has no instance name and the actions attached are as follows:
Bottom LayerCode:onClipEvent(load) { _root.soundstatus="on"; _root.mySound = new Sound(_level0); _root.mySound2 = new Sound(_level1); _root.mySound3 = new Sound(_level2); _root.mySound4 = new Sound(_level3); _root.mySound5 = new Sound(_level4); maxvolume=100; minvolume=0; } onClipEvent(enterFrame) { if(_root.soundstatus=="on") {step=5} if(_root.soundstatus=="off") {step=-5} maxvolume+=step; if (maxvolume>100) {maxvolume=100;} if (maxvolume<0) {maxvolume=0;} _root.mySound.setVolume(maxvolume); _root.mySound2.setVolume(maxvolume); _root.mySound3.setVolume(maxvolume); _root.mySound4.setVolume(maxvolume); _root.mySound5.setVolume(maxvolume); }
Has a movie clip called Sound_6. It has no instance name and no actions attached.
Inside Sound_6
One layer containing a movie clip called Sound_5. No actions, no instance name.
Inside Sound_5
There are 4 layers and 2 frames.
Top Layer
1st frame holds an instance of a Button called Sound_4. It has no instance name but the actions are:
The top layer, frame 2 is another button instance of Sound_4 with these actions:Code:on (release) { gotoAndPlay(2); } on (release) { _root.soundstatus="off" }
Second LayerCode:on (release) { gotoAndPlay(1); } on (release) { _root.soundstatus="on" }
Has two frames that both contain the action stop();
Third Layer
Frame 1 holds a movie clip called [on]_TXT, no instance name, no actions. Frame 2 holds a movie clip called [off]2, no instance name, no actions.
The Fourth
Layer contains a movie clip called Sound_3. It is an animation of audio bars.
Inside [on]_TXT & [off]2
Static text.
I have created an external swf which plays an FLV movie. A button in the time line loads the external swf. The desired effect is to shut off the playing music so that the audio of the FLV can be heard. I've tried this code:
When I do this the sound of the loaded movie is not audible. However when the button in the loaded movie titled "close" is clicked and the movie is unloaded the "on and off button" detailed above is still functional and can be used to turn the sounds and music back on.Code:on (release) { loadMovieNum("moviename.swf", 1); _root.soundstatus="off"; }
I have also tried this code:
The effect of this code is to stop the music, the audio of the loaded movie plays normally... HOWEVER... the buttons behind the loaded movie still play their chirping and beeping sounds, and when the movie is unloaded the "on and off button" that I described is no longer functional and the background music can not be restarted.Code:on (release) { loadMovieNum("moviename.swf", 1); stopAllSounds(); }
I've spent hours trying to figure this out. I'm hoping someone can help me think outside the box and perhaps even give me some guidance. THANKYOU!




Reply With Quote