position array relative to stage
Hi There,
Can anyone reccomend a way to position an array containing movie clips relative to the stage? Here's what I was trying...
import flash.display.MovieClip;
var one:MovieClip = new One();
addChild(one);
var two:MovieClip = new Two();
addChild(two);
var three:MovieClip = new Three();
addChild(three);
function initialDisplay(event:Event):void {
var myStage:Stage = this.stage;
var swfWidth:int = myStage.stageWidth;
var swfHeight:int = myStage.stageHeight;
var spacing:Number = 10;
var clipArray:Array = [one, two, three];
for (var i:int = 0; i < clipArray.length; i++) {
clipArray.buttonMode = true;
clipArray.y = spacing + i * (one.height + spacing);
clipArray.x = 100;
}
clipArray.y = swfHeight - 50;
}
addEventListener(Event.ENTER_FRAME, initialDisplay);
I know clipArray.y refers to the y positoin spacing, but I can't figure out how to tell the entire array to stay 50 pixels from the bottom of the swf doc so that it stays relative to browser size. I want to do this in an array so that in the future, I can say, whenever clipArray is clicked (i.e. mc one, two or three); remove a child that contains a background animation.
Thanks!