Hello, I have one movieclip A within another movieclip B , and I use button to move movieclip B up and down. Then how can I get the position value of the movieclip A ( the global position not the relative position to movieclip B ). Thanks very much in advance and wait for your reply!
Look up the [font=courier new]MovieClip.localToGlobal()[/font] method in the ActionScript Dictionary.
hi, I have checked but still now sure about how should do with it. Could u have some detailed guide about it.
I have the movieclip A in movieclip B with the relative position of x: -15.8 and y: -22.8
Then I have the button for moving movieclip B up with
the action like
on (release) {
_root.B._y -= 5;
}
So the movieclip A is moved at the same time within movieclip B
Then how should I write the code to get the global position of movieclip A then ?
Thanks very much in advance !
var p = {x:b.a._x, y:b.a._y};
b.a._parent.localToGlobal(p);
trace("x:"+p.x+"\ry:"+p.y);
??