Sounds and loops

Hi all, new to Flash and AScripts.\r\rBasically I have a flash swf that runs for 3 minutes but is set to loop continuously. Within in it I have a couple of incidental sounds (set as streaming) that occur on several occasions throughout the three minutes. They are placed on two separate layers as they overlap at times. Out of courtesy to the visitor, I have placed a ‘SOUND OFF’ button on the movie which, you guessed it, stops all the sounds. Unfortunately though, when the movie loops back to the first frame again, it plays the sounds again.\r\rIs there anything I can attach which remembers that the visitor switched the sound off on the previous loop?\r\rAny help would be much appreciated.\r\rRegards\r\rCB

An if statement should do the trick. Ok, on the sound button you’re going to want to set a variable. so use a code like this\r\ron (release) {\r sound = 1;\r}\r\rthat sets your variable to 1. \rNow in the first frame of your movie put the code\r\rif (sound=1) {\r COMMENT:I’m not sure what you would want to put here. \r //Maybe stop playing all sounds, or something to \r //that effect. play around with it and let me \r //know how it works out.\r}\r\rthis code will get ya started, hopeuflly you can figure the rest out on your own, or maybe some of the masters have an easier way to do it. i can’t really do anything with sound cuz my roommate is still asleep. I’ll try something in a little while after i wake his lazy a$$ up. good luck

IANJ\r\rThanks for the assistance, still trying to work my way around it as I haven’t figured it out yet using several variations.\r\rCheers\r\rCB

Careful, Jubba. The test is not

 if (sound=1) {\r\rbut :if (sound==1) { \r\ror : if (sound) {

What you wrote is always true, because Flash will check if the variable “sound” has successfully been set to 1.\r\rpom 0]

so thats why it wouldn’t work for me. @#%$, i alway forget something like that.