Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

controlling audio using shared objects

Status
Not open for further replies.

Flashoid

Technical User
Dec 11, 2002
163
0
0
US
Hello -

I am attempting to control the audio using shared objects. The goal is so when a user opens the first swf and they push an audio off button it will turn off the audio and it will keep it off when they open other swfs with audio. The audio needs to automatically play when the user enters the swf so they dont have to click audio on every time they enter the swf.

The only way I know how to approoach this was with SOs however the problem I see is that once the user creates an audio Off SO it will always be there so the audio will never come back because once the user enters the swf it will look for and see the off SO and keep the audio off and vice versa with creating and reading the audio on SO.

I've thought us trying to purge the audio off SO when the user clicks on the audio On button but that didn't seem to work, but maybe i just didnt do it right.

Does anyone have any thoughts on how to do this, I am assuming using Shared Objects is the way to go.

thanks!
 
I can use stopAllSounds for the buttons but i want the user to be able to click audio off once in any individual swf and have it stay off when they leave that swf and enter any other swf so the user doesnt have to push audio off for every new screen.

I thought SO would be one to do it but I cant figure out how.
 
I'm confused...

In your initial post, you seem to want that the audio be automatically switched on, when entering a new .swf, eventhough it may have been switched off...

The audio needs to automatically play when the user enters the swf so they dont have to click audio on every time they enter the swf.

And in your last post, you seem to want it to stay off?

If the latter, you could use a global soundObject, and control the global volume... Thus, when the user switches the sound off, set the global volume to 0, and it will remain like that until the user switches it back on...

Regards. FLASH HELP - OPENED FOR BUSINESS!
TO GET YOUR OWN FREE WEBSITE HOSTING
 
Sorry for the confusion. The audio would need to come on automatically when the user enters the swf, however, if the user had previously pushed the audio off button on a different swf the sound would not come again until they pushed the audio on button again (even though it is coded to come on automatically on each screen, there would be SharedObject code so it would not come on because the user has already pushed the off button).

Basically I need an audio on and off button that remembers that the user turned the audio off so if they open any subsequent and different swf it doesn't come on unless they click the audio on button again.
 
It would be on different pages- do you have any ideas how to do this using SObjects? I thought maybe of using the same SO but writing a number or word inside of it to indicate audio on or off.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top