Creating an array of movie clips

Does anybody know how to go about creating an array of movie clips? Can it be done? I can’t find it in any of my books.

what do you mean ?\r\rpom 0]

Well i have about 20 images, and depending on a variable (which will hold a number 0 to 19), i want to scroll (through a loop that sets the _x property of) the corresponding image across the screen.

(and the images will be in movie clips)

you can go about it two ways.\r\rsay your movies are named “zero”,“one”,“two” … “nineteen” and reside in _root.\r\reither have the array contain strings that will evaluate to be the movie.\r\r_root.myArray = [“zero”,“one”,“two” … “nineteen”];\r\rthen to call them:\r\r_root[_root.myArray[4]];\r\rwould refer to the movie named “four”\r\ror (this is probably better) populate the array with actual references to the movies:\r\r_root.myArray = [,,_root.two … _root.nineteen];\r\rthen referring to the array reference is the same as referring to the movie, so to make “eleven” play:\r\r_root.myArray[11].play();\r

I love you.

This idea might work for what im trying to do as well. Im trying to create next/previous track buttons for audio player.\rI could set all my external files into an array but I couldnt really assign them a number would have to have some type of formula involved. Any suugestions suprabeener?\r\rSay I have 10 songs in root called 0.swf - 9.swf.\r

since the loadMovie command is expecting a string as the argument, the first method would probably work best for your purposes:\r\r_root.songArray = ["0.swf’,“1.swf”,“2.swf”…];\r\rand to load a random song into _level10:\r\rloadMovieNum(_root.songArray[random(_root.songArray.length)],10);\r\ror song number 8:\r\rloadMovieNum(_root.songArray[8],10);\r