0 Replies Latest reply on Jul 12, 2007 12:51 AM by ritpas

    Problem with loading external movies

    ritpas Level 1

      I made the following intro I integrated under Flash with as 3.0 :

      In fact the anim consists of a root movie containing the frame of the intro and which loads a second movie which is the intro itself (also an swf file).

      All looks fine at first glance but anything puzzles me :
      - I put a "stop" at frame 1 of the second movie ( I always proceeded so under AS 2.0) to make sure that the movie is fully loaded before playing.
      - on the root movie which loads the intro, I used contentLoaderInfo and Loader classes to load the intro and added listener to the Event.INIT event. When that event is triggered I make the intro play (it is supposed to be stopped) with the following code :
      function chargement_ok(evt:Event) {
      var intro:*=evt.target.content;
      - I also build a preloader which is represented by the gun barrel at the bottom of the anim, it is supposed to load a cartridge on each 1/6th of the loaded intro.
      I used therefore a PROGRESS event with the following code :
      function chargement_progression(evt:ProgressEvent) {
      if (evt.bytesLoaded>=n*evt.bytesTotal/6) {
      //on insère une cartouche dans le barrel
      bareel.cartridges["cartridge" + n].gotoAndStop(1);

      At first, when I put it online, I was surprised by the speed at which the intro movie is loading, indeed the intro plays almost immediately. But infact, it looks as if it is streaming, as if the stop at 1st frame of my intro movie is not taken into account.

      By the way, another strange thing : the cartridges are loading while the intro has already begun , you can see that. I expected the cartridge to load before the intro plays, according to my code, but obviously the flash player behaves not that way.It looks as if the PROGRESS event is running after the INIT event which is illogical.

      Could anybody explain me that strange behaviour, it looks as if I missed anything.