Assuming a UILoader instance named “myLoader” is on the stage, consider the following code:
myLoader.load(new URLRequest("http://www.colegrp.com/DI_Avatar.jpg"));
myLoader.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
myLoader.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
function handleMouseDown(evt:MouseEvent):void {
trace("b1: " + myLoader.x + "," + myLoader.y);
trace("b2: " + myLoader.content.x + "," + myLoader.content.y);
myLoader.startDrag();
}
function handleMouseUp(evt:MouseEvent):void {
myLoader.stopDrag();
trace("a1: " + myLoader.x + "," + myLoader.y);
trace("a2: " + myLoader.content.x + "," + myLoader.content.y);
}
Dragging the picture around doesn’t seem to update the x & y properties. The picture has clearly moved, though I can find no values that reflect the change.
??