[quoted text, click to view] > I will try and explain what my problem is in as much detail as possible.
> I have a main movie into which all other movies load into an empty movie clip. In my main movie I created a seperate movie clip and inserted a sound loop with frames extending the entire length of the sound. I have put no stop actionscript because I want it to loop continually.
> Ok, now I go back to my main scene and drag this movie clip to its own layer (it plays ok when I test the movie but there is a one second gap which is annoying when it comes to the end of the music) Can this be fixed?
You should not use frames to loop the sound . Event sound run independent to timeline and even it shows the
wave on your frames ,it is never accurate and will behave differently on different CPU.
Place sound on frame than go to frame properties , click frame and hit CTRL F3 - go to sound , you find LOOP
box there , just key in number of loops you like it to play and make sure the sound is set to EVENT.
Rest keep as it comes by default .
[quoted text, click to view] > I now made two bottons for turn music off and turn music on. I am not sure what actionscript to put on the turn music on button. I put the following script on the off button as follows:
> on (release) {
> stopAllSounds();
> }
>
> This works fine but as I say I don't know what to do with the on button.
> In fact I would like to know If I am going about all this in the correct way, for example I am not sure if The music should even be placed in a movie clip?
There is no MUST on placing sound in movie clip , there is no DON'T as well , really depends on how you like it
and how you feel is more conformable to work with it .
I would avoid definitely SOund Object Attaching , the sound than load prior to any other content causing delay from
very beginning of the movie . Movie Clip can be even better in your case .
We could actually use it to control the audio w/o problem with sound object and keeping it in the movie clip
in the same time .
Place the sound on first frame of movie clip , set the loop and event option.
Give the movie clip instance name - CTRL F3 - key in name in the instance name box , call it "MCaudio"
Now , once we have instance name , we can use sound object to control the volume by using the instance
name as target . SO to mute the audio , all you need is :
on (release) {
s = new Sound(MCaudio);
s.setVolume(0);
}
to set it back ON
on (release) {
s = new Sound(MCaudio);
s.setVolume(100);
}
Regards
urami_*
<lsym>
There's no place like 127.0.0.1