Need expert help!

OK…I have multiple scenes in my movie, I have a sound wav playing throughout the movie. I also have a toggle on and off for the end user to be able to switch it on and off at their leisure.

My problem is when the flash movie goes to the next scene it forgets what the user clicked in the previous screen (on or off) and the wav starts playing automatically.

The big thing I have to figure out with your great minds is…If the end user clicks sound off in the first scene I would like it to stay off in all the following scenes until he or she turns it back on.

Please if you know answer this, IM desperate! Thanks in advance! JesseH

p.s I need a way to detect whether the toggle is on or off …thanks!

p.s.s when you are in the first scene, click sound off, then go to the next scene by clicking the (dive team link at the top) you will see that the sound stays on in the second scene …even though you turned it off in the first. Thanks guys! JesseH

scenes make life so much more difficult for coding … bleh … i avoid them if i can

but if you must use scenes i would recommend that you use a variable in a seperate file. you’d have a seperate swf file that would store the variable and when you clicked off it would be 0 when you clicked on it would be 1 … that way whenever the music tried to load it would look at this file and see whether it was supposed to be on or off.

no i don’t know the code off the top of my head but i’m sure one of our gurus around here could figure it out very quickly.

hope this helps

Well, if a variable in set in a scene, it remains in another scene… So there shouldn’t be any problem with that. What are you doing exactly to start and stop your sound?

pom :asian:

Here is the link, it is on a free site so if it gets to much traffic it will shut it down for an hour, so please only go there only if you are going to help with the problem…here is the link guys

http://www.geocities.com/simulation79

you will notice the sound button at the bottom (IT IS IN A MOVIECLIP) with 2 frames, with stop actions in each. one frame unloads the external music swf and the other loads it

since I have to use scenes due to other aspects of the simulation,… if the end user chooses stop for the sound wav button at the bottom…I would like that choice to continue for the next scene.

if you could tell me where to set up the variable( in the movieclip? or on the main stage that would help!)

and also please tell em how you would go about doing this in detail! THANKS!! so much JesseH

hey,I think maybe this method can solve your problem.
(But,my english is not very good,so try your best to understand what I say.)
I don’t think it should use the variable.The way you load the music is important.

In the FlashMX,first,you import a music.In this music “Linkage Properies” ,give him a “Identifier” such as “sound1”.

Second,you should make a new sound(); such as
wav_sound=new sound();
wav_sound.attachSound(“sound1”); //here sound1 is “Identifier” name
wav_sound.start(1,500); //here 500 is the times the music loop

Third,now if you want the music to stop,just add this script on the
close button (wav_sound.stop():wink:
Of course,you alse should notice the path problem.

I wish this method can help.
:smirk:

this is coming from someone who know’s nothing but…

could you not just make a seperate .swf file and add it to your movie

then use frames so you movie changes but your sound on/off thing stays there all the time

Chris thanks… however I am doing that. I am loading and unloading an external wav.swf into my main movie but since I have multiple scenes in my movie, when it goes to the next scene and you turn the sound off in the first scene it does not unload the swf when it reaches the second scene …, thanks though! appreciate you taking the time to help! JesseH

if anyone can help go to this site and please look at the problem

http://www.geocities.com/simulation79

when you are in the first scene click the sound to off at the bottom. (that works fine)

then click the link at the top (Dive Team)
it then goes to the second scene and the sound is on

(it doesnt unload the external wav.swf), because it doesn’t detect that the end user turned it off in the first scene. PLEASE HELP! JesseH

http://www.geocities.com/simulation79

I figured out a different way to do this finaly, thanks to everyone for there help!