At 8/4/07 05:54 PM, T-H wrote:
To be honest I find globalToLocal / localToGlobal even more annoying to work with, they can be very buggy and unresponsive
Yeah, if you really find using levels of MCs annoying then I just reccomend writing your own function. Like:
function getFullPos(levs:Number):Array{
var cos:Array = [this._x, this._y];
levs > 1 ? (cos[0] += this._parent._x, cos[1] += this._parent._y]) : 0;
levs > 2 ? (cos[0] += this._parent._parent._x, cos[1] += this._parent._parent._y]) : 0;
levs > 3 ? (cos[0] += this._parent._parent._parent._x, cos[1] += this._parent._parent._parent._y]) : 0;
levs > 4 ? (cos[0] += this._parent._parent._parent._parent._x, cos[1] += this._parent._parent._parent._parent._y]
) : 0;
// if you really need any more than this you've got some serious nesting...
return [cos[0], cos[1]];}
;
Optimise away!