Results 1 to 3 of 3

Thread: Sound on/off button

  1. #1
    Join Date
    Nov 2007

    Sound on/off button

    Hi there,
    With risk to annoy hundreds of people with asking so simple question, and maybe in the wrong place, i'm asking you guys to help the newb.
    I followed that tutorial http://www.entheosweb.com/Flash/flash_sound_button.asp to create a sound on/off button, but i need to add some SharedObject? script so it can remember its on or off state, even if page is refreshed. I'm totally new to flash, doubt i'll use it again and all that probably basic to you stuff is alien to me.
    Appreciate any help!

  2. #2
    Join Date
    May 2008
    San Diego
    Can you post your code in here?

  3. #3
    Join Date
    Nov 2007
    It's exactly as it is in the tutorial, here's a link to the flash file: http://www.entheosweb.com/Flash/downloads/sound.zip
    It's 2 movie clips: one for sound, one for the buttons.

    The sound one has 3 frames:
    frame 1 with the actual sound and the code: stop();
    frame 2 with the code: stop(); gotoAndStop(1);
    frame 3 with the code: stop(); gotoAndPlay(1);

    The buttons clip has 2 frames:
    frame 1, button for sound-off and the code:
    on (release) {tellTarget ("../sound") {stopAllSounds();}}
    on (release) {nextFrame();}
    frame 2, button for sound-on and the code:
    on (release) {tellTarget ("../sound") {nextFrame();}}
    on (release) {prevFrame();}

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center