3 Replies Latest reply on May 20, 2007 12:31 PM by Sketchsta

    Actionscript for background sound

      ok i have a website i am building in it i have 5 menus.
      i want to have the background music to play, but when the intro menu is active i want the background music to stop playing for the intro menu i loaded the intro movie clip an it has its own background music. but when i leave the intro menu i want to restart the background music.

      how can i go about this?
      for both background music in main movie an loaded movie intro.swf have the same background music names.
      is it just a matter of renaming one of the movies music names?
        • 1. Re: Actionscript for background sound
          Sketchsta Level 1
          load sound when you enter the intro part of the site, and stop it when you exit.

          if you exit the intro via a button, stop the sound object onReleae.
          if no buttons are used, stop the sound on the last frame of your intro, and loadSound on the following frame.

          then start a new loadSound at the beginning of your Menu part of the site.

          that should work. Try it and let us know how it goes.
          • 2. Re: Actionscript for background sound
            rojere3 Level 1
            here is the code that was previously installed but when i click on the button to turn off the sound it turns off all sound.
            including the intro.swf as well as the main movie.

            how can i just turn off the main movie one. the main movie sound is

            which has identifier set as

            Here as you can see in the movie explorer the codes for a designated button in the main movie if user wants to turn sound on or off.

            but i could just use a code like this instead
            in the menu structure on the timeline.

            here is the movie project you can see for yourself
            what i mean how the intro is played.

            • 3. Re: Actionscript for background sound
              Sketchsta Level 1
              create a sound Object for your bg music.

              I dont see one in your code there, so im guessing that the BG Music is embeded on the timeline?