dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Sound on/off

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    29

    Thumbs down

    I'll try to explain the best that I can,
    I am working on one scene, there are five buttons that on a press action it takes you to a certain frame on the same scene. My music for the site is in a movieclip, the on and off feature works only if you click on the buttons in front.

    For example
    when the music is in the off state, I click on the next button and the music is still off, BUT when I click back to the previous button the music starts again. I dont want it to start again I want it to stay off until I tell it to play.

    Hope this was'nt confusing
    Please help..

    Thanks

  2. #2
    Member
    Join Date
    Aug 2000
    Posts
    42
    Relman,

    What code are you using to turn the music on/off? It will aid me in assisting you with this problem. I've got your concept (and it seems good), but there must be a coding error somewhere that we need to tweek!


    Would love to help, please cut and paste the script for your button actions that seem to have the problem.

  3. #3
    Junior Member
    Join Date
    Mar 2000
    Posts
    29
    Thanks for your reply,

    Here goes, On the main scene I have a movieclip called (music). Within that movie in the first keyframe is the music

    stop ();
    sound = "1";

    In the second frame theres

    stop ();
    stopAllSounds ();
    sound = "0";

    Now on the main scene I have a button controlling movie (music)
    its script is

    on (press) {
    tellTarget ("/music") {
    if (sound=1) {
    gotoAndPlay (1);
    } else {
    gotoAndPlay (2);
    }
    }
    }

    hope this helps..

    Thanks again

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center