5 Replies Latest reply on Jun 21, 2006 10:37 PM by kglad

    having trouble in external preloader

    VooDoo Chicken Level 1
      the general idea is as follows:

      there is a main movie which has lots of pictures (not vectors), so i decided to make the preloader in a separate file, so when it tries to load it wont appear as a blank screen for a long time, with the user not knowing whats happening or if is loading or not; this is also the first time i try to make the preloader in a separate file. the main file works ok (now it does)

      the preloader is as follows, two frames, in one there is either screen.loadmovie(url) or loadmovie("screen", url), both with the same results (as it was supposed to happen).

      in the two frames there is a layer with an object in both frames called 'screen', so when it changes to the second frame, there will be only 'screen' and not the graphics and animation of the preloader, which are only in the first frame.

      to change to the next frame, i tried the following:

      in an 'onenterframe'

      if (screen.getbytesloaded()==scrn.getbytestotal())
      nextframe and delete this event handler

      the problem is that, when i placed a trace(screen.gettotalbytes) right after the loadmovie sentence, i get a 12 instead of ~600 which is the weight of the main movie, the result is that it displays the loading animation for half a second, then jumps right to the second frame to show a blank screen for quite a while till the main movie loads, throwing away all the pourpose of the preloader.


      also tried:

      screen.onload(){
      nextframe();
      }


      tried to declare this either after and before the load movie sentence, but in no case it seems to be called, placed a trace sentence in it but was never displayed, the result is that it never changes to the second frame, so it displays the loading animation over the main movie. how do i retrieve totalbytes and bytes loaded of the movie i am trying to load, not a white block i set as target?

      tnx