I THOUGHT THIS WOULD SNAP (choice_1) BACK INTO PLACE AFTER HITTING TEST OBJECT. WHAT DID I DO WRONG?
import flash.net.URLVariables;
import flash.net.URLRequest;
var origX:Number;
var origY:Number;
/* Drag and Drop
Makes the specified symbol instance moveable with drag and drop.
*/
origX = x;
origY = y;
choice_1.buttonMode = true;
choice_1.mouseChildren = false;
choice_1.addEventListener(MouseEvent.MOUSE_DOWN, fl_ClickToDrag);
function fl_ClickToDrag(event:MouseEvent):void
{
choice_1.startDrag();
}
stage.addEventListener(MouseEvent.MOUSE_UP, fl_ReleaseToDrop);
function fl_ReleaseToDrop(event:MouseEvent):void
{
choice_1.stopDrag();
if(choice_1.hitTestObject(box_1))
{
box_1.text = choice_1.text;
}
x = origX;
y = origY;
}
Thank you so much in advance for any help!