Step 1: Change Movie clip to Object.
example:- Here have c_mc is child of b_mc and b_mc is a child of a_mc.
now we will find c_mc x and y postion in main stage
var obj:Object=new Object();
obj=a_mc.b_mc.c_mc;
Step 2: Get x and y position using with localToGlobal method.
var poi:Point=new Point(obj.x,obj.y);
poi=obj.parent.localToGlobal(poi);
poi.x and poi.y are c_mc movieclip x,y positions.
Thank you Friends
...CHeeRS...
1 comments:
Thank you so much this helped because it kept returning the value 0, 0 when I said obj.obj.x and obj.obj.y
Post a Comment