2 Replies Latest reply on Apr 3, 2007 5:11 AM by Spaantje

    Problems whit loading bar!

    Spaantje
      Hello,

      I got a problem with the loading bar from Flash.
      I'm using a script to import a list of movies from a XML file. Only now i want to use a loading bar to show the progress of the files loaded. But i can't get it to work. It only show the loading of the first file.

      Can someone help me please?
      (The script is based on the Sample included with Flash Pro, the Gallary Tween)

      Thanx.

        • 1. Re: Problems whit loading bar!
          MotionMaker


          From a quick glance

          var thisMC:MovieClip = this.createEmptyMovieClip("image"+i+"_mc", i); is defined inside of a function and so each time the function is ends, thisMC is destroyed.

          Suggest you create an array with root level scope.
          var movieClips:Array = new Array()

          Then in the function
          movieClips.push(thisMC);

          That will keep the reference alive. You can use thisMC in the function and outside the function if necessary you can use the array.



          • 2. Re: Problems whit loading bar!
            Spaantje Level 1
            quote:

            Originally posted by: MotionMaker


            From a quick glance

            var thisMC:MovieClip = this.createEmptyMovieClip("image"+i+"_mc", i); is defined inside of a function and so each time the function is ends, thisMC is destroyed.

            Suggest you create an array with root level scope.
            var movieClips:Array = new Array()

            Then in the function
            movieClips.push(thisMC);

            That will keep the reference alive. You can use thisMC in the function and outside the function if necessary you can use the array.


            Thanks for the reaction.
            But that doesn't work like i want.
            But i have a solution already.

            Thanks anyway.