This is just a little write up I’m doing for my little lady. Everyone else can ignore.
Mind you sweety… I’m going to have to test this. I’m sure that there will be at least one error in this thing.
first create your square, select it, and hit F8 to make it a movie clip. Give it a library reference name of “sq0”.
then in Frame 1 of an action script layer on the main timeline
//this first function initiates your movie by attaching instances of the sq clip to the stage and then positions them randomly over a 300 by 100 area
function initiateMovie(){
for (i=1;i<6;i++){
_root.attachMovie(sq0,“sq”+i,i);
_root[“sq”+i]._x=Math.random()*300-1;
_root[“sq”+i]._y=Math.random()*100-1;
}
}
//this function replaces a movie clip to a new location and then sets it’s visibility back to true
function replace(){
_x=Math.random()*300-1;
_y=Math.random()*100-1;
_alpha=100;
}
//this function fades the clip out in 1 pt steps. this can be increased by setting the last statement in the for loop to i-=5
function fadeOut(){
for(i=100;i>-1;i–){
_alpha=i;
}
replace();
}
frame 2 of the main timeline
initiateMovie();
as far as the rest of it… you’ll have to get back to me on exactly when and why you’ll have the movie clips fade out… but it’s easy enough to call out to the fadeOut function via any timeline or button simply by calling
_root.fadeOut();
If any of your Kirupians notice an error, feel free to let me know… There are usually a couple when I’m doing this from my head rather than in Flash.