2 Replies Latest reply on Oct 21, 2008 5:06 AM by martinjamesroberts1

    Preloader making my movie loop

    martinjamesroberts1 Level 1
      Hi there,

      really love to get some help with this.. I'm hoping it is a simple problem:-

      Basically I have a preloader bar in the first frame of movie with this actionscript (AS2)

      stop();
      this.onEnterFrame = function() {
      var procentLoaded:Number = this.getBytesLoaded()/this.getBytesTotal()*100;
      bar_mc._xscale = procentLoaded;
      if (procentLoaded == 100) {
      this.play();
      }
      }

      Then I have in my last frame the efollowing code to make it wait 10 seconds to go to the link I have

      stop();
      function openWebsite(url:String)
      {
      getURL(url,'_blank')
      }
      website='#'
      setTimeout(openWebsite,10000,website)
      entrez_btn.onPress = function() {
      getURL('#');
      }
      palais_btn.onPress = function() {
      getURL('#');
      }
      domino_btn.onPress = function() {
      getURL('#');
      }
      riviere_btn.onPress = function() {
      getURL('#');
      }
      murailles_btn.onPress = function() {
      getURL('#');
      }

      Problem is when it gets to the last frame it doesn't stop... it just continues to loop without waiting

      PLEASE HELP!!

      Many Thanks
      Martin