1 Reply Latest reply on Jun 25, 2007 5:17 AM by MotionMaker

    Loading Images

    Rajesh Kaki

      I have 50 images, i want to load those images into flash file dynamically, and i want to arrange them in a order 10 rows and 5 columns.

      Can any one give solution for this.

      and i want them in random order also.for Every time(when i am opening the swf) the images location will change.

        • 1. Re: Loading Images
          MotionMaker Level 1
          You need to generate 50 MovieClips. You can use createEmptyMovieClip or attachMovieClip and give each a unique name and depth. Then push them onto an array.

          Create an array of the image file names.

          Use Math.random (help has code) to find an index in the image file array.

          Remove that item from array and in the MovieClip array load that image.

          If all the images are the same size, you can position the MovieClips into the rows and columns when you created them.