Hi
I am using AS3 and want to have an object floating in a movie clip.
I can make a movie clip float in the middle of the stage but not in a movie clip.
How do I do this?
Thanks
Printable View
Hi
I am using AS3 and want to have an object floating in a movie clip.
I can make a movie clip float in the middle of the stage but not in a movie clip.
How do I do this?
Thanks
In fact how do you find the width of a movieclip using AS3
similar to stage.stageWidth?
A MovieClip's width is accessible through it's width property.
Code:trace(aClip.width);
import flash.geom.Point;
var point:Point = new Point(a.width/2 - a.m.width/2, a.height/2 - a.m.height/2);
a.m.x = point.x;
a.m.y = point.y;
a is the parent movieclip.