4 Replies Latest reply on Nov 30, 2006 6:33 PM by Newsgroup_User

    Preloader problem!!

    Level 7
      Hi everyone!!!

      My site goes through the follow structure:

      (startpage) that loads the (mainpage) in a new container MC (alvo) but
      in the same level (0).
      from within the (alvo).(mainpage), I call another container MC (movies),
      now in level (2).

      The problem:

      From the (statpage) to the (alvo).(mainpage), the preloader works fine,
      but from the main page to the new container MC (movies) it doesn't
      appear until the 96/97% of the MC is loaded. Then it appears suddenly
      until the 100% is arrived and jumps to the next frame.

      The code:

      onClipEvent (load) {
      total = _parent.getBytesTotal();
      size = length(total);

      barra._xscale = 0;

      ini_time = getTimer()/1000;

      _parent.stop();
      }
      onClipEvent (enterFrame) {
      loaded = _parent.getBytesLoaded();
      pct = (loaded/total)*100;
      barra._xscale = int(pct);

      if (pct == 100) {
      _parent.play();
      }

      pct = Math.floor(pct)+"%";
      }

      Is that right??
      Someone have any idea about what is happening??

      Thanks for everyone!!!
        • 1. Re: Preloader problem!!
          Marghoob Suleman Level 1
          if (pct >= 100) {
          _parent.play();
          }

          it will help you.

          >>if (pct == 100) {
          >>_parent.play();
          >>}

          • 2. Re: Preloader problem!!
            Level 7
            Thanks a lot!!

            Bu it remains the same!!

            edd escreveu:
            > Hi everyone!!!
            >
            > My site goes through the follow structure:
            >
            > (startpage) that loads the (mainpage) in a new container MC (alvo) but
            > in the same level (0).
            > from within the (alvo).(mainpage), I call another container MC (movies),
            > now in level (2).
            >
            > The problem:
            >
            > From the (statpage) to the (alvo).(mainpage), the preloader works fine,
            > but from the main page to the new container MC (movies) it doesn't
            > appear until the 96/97% of the MC is loaded. Then it appears suddenly
            > until the 100% is arrived and jumps to the next frame.
            >
            > The code:
            >
            > onClipEvent (load) {
            > total = _parent.getBytesTotal();
            > size = length(total);
            >
            > barra._xscale = 0;
            >
            > ini_time = getTimer()/1000;
            >
            > _parent.stop();
            > }
            > onClipEvent (enterFrame) {
            > loaded = _parent.getBytesLoaded();
            > pct = (loaded/total)*100;
            > barra._xscale = int(pct);
            >
            > if (pct == 100) {
            > _parent.play();
            > }
            >
            > pct = Math.floor(pct)+"%";
            > }
            >
            > Is that right??
            > Someone have any idea about what is happening??
            >
            > Thanks for everyone!!!
            • 3. Re: Preloader problem!!
              Mister Peanut Level 1
              also, if you have any components you need to uncheck export in first frame. Right-click on them in the library, select linkage, and make sure 'Export in First Frame' is unchecked. Otherwise, everything may load before you need it.

              look at Publish settings, Flash, Settings and look at which frame 'Export Frame for Classes' is set to.

              • 4. Re: Preloader problem!!
                Level 7
                Ohhh!!! Nice Trick!!!!

                Now it works fine!! thanks a lot!!!

                Mister Peanut escreveu:
                > also, if you have any components you need to uncheck export in first frame.
                > Right-click on them in the library, select linkage, and make sure 'Export in
                > First Frame' is unchecked. Otherwise, everything may load before you need it.
                >
                > look at Publish settings, Flash, Settings and look at which frame 'Export
                > Frame for Classes' is set to.