MovieClips: Position Movie clips with Actionscript 3

Create three movieclips on your stage.
Give the first an instance name of mcCenter.
Give the second an instance name of mcBottomLeft.
Give the third an instance name of mcTopRight.

Actionscript:

mcCenter.x=stage.stageWidth/2;
mcCenter.y=stage.stageHeight/2;

mcBottomLeft.x=stage.stageWidth-stage.stageWidth+mcBottomLeft.width/2;
mcBottomLeft.y=stage.stageHeight+mcBottomLeft.width/2;

mcTopRight.x=stage.stageWidth-mcTopRight.width/2;
mcTopRight.y=stage.stageHeight-stage.stageHeight+mcTopRight.width/2;

Example:

Get Adobe Flash player

Leave a Reply