5 Replies Latest reply on May 10, 2006 6:21 PM by RFsantos

    Same flash sound on every html page

    RFsantos
      Hi, i´ve a problem on site that i´m doing, ineed to put a background flash music/sound on all the pages, but i don´t want the sound to reload every html click/refresh. I know it should be possible by storing que sound position or legend on a veriable. but i dont´t know how.

      Please help, and thx in advance
        • 1. Re: Same flash sound on every html page
          TimSymons Level 1
          If you embed Flash on each page then it will have to reload for the next page. If you want to just load it a single time, you should design your site with HTML Frames. Set one of the frame to be of size "0" (zero) and embed a Flash movie into that frame that contains the sound.

          Tim
          • 2. Re: Same flash sound on every html page
            RFsantos Level 1
            Thx, but that i know, and i can´t put a frame page on my php template. So i have to find a way to code it. I read in actionscript.org forum that is possible. But as i sad i don´t know how.

            RFSantos
            • 3. Re: Same flash sound on every html page
              TimSymons Level 1
              OK. You will probably want to use the SharedObject class then. This will allow you to save info from one movie and then load it into another. You can use it to store information on the current position of the sound and then use it to resume when the next HTML page of your site has been loaded.

              Just do a search in your help docs for "sharedobject". It will give you a couple of examples.

              Tim
              • 4. Re: Same flash sound on every html page
                RFsantos Level 1
                Thx Tim, i will try, but it looks good
                • 5. Re: Same flash sound on every html page
                  RFsantos Level 1
                  Ok i tried it, but still no working, because i´m not good enought. My code so far is :

                  loop1 = new Sound( MC1 );
                  loop1.attachSound( "theme" );
                  this.onEnterFrame = function () {
                  _root.songDurationText=_root.loop1.duration/1000;
                  _root.songPositionText=_root.loop1.position/1000;

                  songDuration = _root.loop1.duration / 1000;
                  songPosition = _root.loop1.position / 1000;
                  }
                  var local_data = SharedObject.getLocal( "sound_position" );
                  local_data.data.sound_position = _root.loop1.position / 1000
                  trace( "root sound_position: " + local_data.data.sound_position );
                  if (stored_sound_position = local_data.data.sound_position) {
                  playing=true;
                  loop1.start();}
                  else loop1.gotoAndPlay (1)
                  ---
                  help needed