loadMovie removes attributes from empty MC
Posted on 2007-04-08
I'm loading images during runtime into empty movie clips(create with createEmptyMovieClips method). Each image has an associated id number which I push onto an array:
var idArray = new Array('1','2','3','4','5');
So now the timeline has an array and 5 movie clips with instance names: for example: id18, id22, id31, id45, id52
What I want is to, using AS, fade these images in sequence, while id1 fades out I want id2 to fade in, and so on...then have it loop back to 1 when id5 fades out.
Right now I have a varible pos (for position) a movie clip looping infinitely checking to see if the current positions _alpha > 0. I'll stop here because I hit a problem:
My problem is, after the loadMovie('someimage.JPG',_root.id18) finishes, the MC id18._alpha is reporting undefined. Why did loading an image erase this value? The debugger confirms that no values exist in any attributes, yet the image appears fine.
Anyhow, if I could figure that out then my looping MC could increment the _alpha values and loop through the array..unless there is a more elegant solution.