localToGlobal();

Yup, sussed it.

The problem occurred when I tried to use localToGlobal by coding the object onto the main timeline using MX event handlers instead of having the code directly on the mc Flash 5 stylee, my paths went dippy I think.

This now works:

[codage]

//mc1 being a child of mc2:
_root.mc2.onPress = function() {
this.startDrag();
}
_root.mc2.onRelease = function() {
stopDrag();
}

//–> the important bit.
_root.mc2.mc1.onEnterFrame = function() {
this.point = new Object();
this.point.x = this._x;
this.point.y = _y;
this.localToGlobal(this.point);
trace(this.point.x);
trace(“mc= “+_root.mc2.mc1._x);
};

//old style, on the mc to be tagged. (in this case mc1)
/*onClipEvent (enterFrame) {
point = new Object();
trace(this);
point.x = _root.mc2.mc1._x;
point.y = this._y;
localToGlobal(point);
trace(point.x);
trace(“mc= “+_root.mc2.mc1._x);

}*/

[/codage]

most excellent.

*sighs*

*looks at time*

Hmmm, Vile should be waking up about now.

*prod* *prod*

Comments are closed.

Powered by WordPress. Designed by Woo Themes