The problem is this mc ( in _root ) is offset from the Mouse
position by the x,y coordinates of the nested MovieClip.
How can I update the x,y coordinates of the _root mc so that it
1-initially mimics the exact position of the nested MC
and
2-follows the mouse using StartDrag
Hope this makes sense...I'm wondering if I should even try
simulating a StartDrag using Mouse listeners and converting local
to global coordinates.
Any help appreciated.
I had this exact problem recently. To create the mirror clip, my code
does this, more or less:
function onFirstItemPress() {
var p:Point2D = new Point2D(item_mc._x, item_mc._y);
item_mc._visible = false;
// translate coordinates from one local coordinate system to
another
layout_mc.localToGlobal( p );
dragLayer.globalToLocal( p );
dragItem = dragLayer.attachMovie( foo, foo + "_mc", 0, {
_x: p.x,
_y: p.y } );
dragItem.owner = this;
dragItem.onRelease = function() {
var evt:Object = { type: "newObjectRelease", target:
this };
this.owner.dispatchEvent( evt );
}
dragItem.startDrag();
}
Basically, you were correct, you'll need to translate the coordinates
using some localToGlobal action.
Hope this helps,
OK
DAH
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com