Hi All.
Still trying to get the hang of AS3 here. I basically have 4 MovieClips on my scene and a collection of MovieClips in the library. I want to be able to select 4 from the library at random, and display them on the stage. They will end up being clickable as its a kind of quiz where they click on the objects and the score is recorded. For now I need to get the hang of loading them at random. I also want to be able to make sure there are no duplicate buttons loaded to the stage. So far I have one movie exported to AS and displayed across the stage:
for(var i=0; i<4; i++)
{
var appleMovie:appleMc = new appleMc();
appleMovie.x = +Math.random()*50;
appleMovie.y = +Math.random()*50;
this.addChild(appleMovie);
}
I did try creating an array of movie clips names and then using:
var fruit = new Array("apple", "pear", "grape", "lemon");
But I can’t seem to use this within the for loop. Am I on the right path with this? Your help is appreciated, cheers.