4 Replies Latest reply on Jan 2, 2010 7:31 PM by kglad

    swf movie starts before preloader is finished

    nagelpat

      Hi,

       

      I tried to implement a simple preloader for an existing swf movie. I've created a new flash document and added the Loader as well as a ProgressBar component. In the action script of the key frame 1, I implemented the following:

       

      import mx.controls.ProgressBar;
      loader.contentPath = "myMovie.swf";
      pBar.setStyle("themeColor", "0xF49417");
      pBar.setStyle("color","0x3D566F");
      pBar.labelPlacement = "bottom";
      pBar.label = "LOADING %3%%"
      pBar.scaleY = 150;
      pBar.conversion = 1024;
      pBar.source = loader;
      pBar.mode = "polled";
      loader.load();

       

      The problem is now that the movie starts playing (i.e. its sound) before the progress bar is completely finished. This usually happens around 80%. How can I avoid that the movie starts before the progress bar reaches 100%?

       

      Thanks,

      Patrik