5 Replies Latest reply on Sep 7, 2009 10:14 AM by kglad

    How to preload multiple scenes within an excisting movie?

    Tokerman

      Hi Ned - hope you have another look at this once more - I reposted because it's so long ago I posted it the first time.

       

      Sorry it took such a long time to respond - my computer gave up on me. Memory and harddisk both down the drain - Bummer.

       

      It was helpfull and in a way it works fine, however, I have a main movie and in there I open the multiple scenes.

       

      If I use the preloader alone with the scenes it works, but when I want to load the preloader that should open the scenes inside the main movie it doesn't do anything.

       

      var l:Loader = new Loader();
      l.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loop);
      l.contentLoaderInfo.addEventListener(Event.COMPLETE, done);
      l.load(new URLRequest("magazine.swf"));

       

      function loop(e:ProgressEvent):void
      {
          var perc:Number = e.bytesLoaded / e.bytesTotal;
          percent.text = Math.ceil(perc*100).toString();
      }

       

      function done(e:Event):void
      {
          removeChildAt(0);
          percent = null;
          addChild(l);
      }

       

       

       

      In the old situation I use a button goto frame - and on the frame there is actionscript that says:

       

      stop();
          loadMovie("magazine.swf", 'placeholder');

       

      have changed that to

       

      stop();
          loadMovie("preloader.swf", 'placeholder');

       

      Any ideas?

       

      Thanx