February 2010
M T W T F S S
« Jan   Mar »
1234567
891011121314
15161718192021
22232425262728

Aligning movie clip to the edge of the stage

Problem
Need align Movie Clip to left, right, top and bottom of the stage.

Solution
Using dot to align movie clip to the left and top. And using stage.Width and stage.Height to align movie clip to the right and bottom.

Detailed explanation

//box_mc.x=0; // left aligning

//box_mc.y=0; // top aligning

box_mc.x=stage.stageWidth-box_mc.width;// right aligning

box_mc.y=stage.stageHeight-box_mc.height;// bottom aligning

index8

This technic will be helpful if you need align your movie clipt to right+bottom of the stage and if you will change your stage size your movie clip will be on corner all time.

Source in attached files.

Source:
aligningMC

Thank you for reading.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>