OK, first the relevant code:
***************************************
stage.addEventListener(MouseEvent.MOUS… onHold);
stage.addEventListener(MouseEvent.MOUS… onUp);
function onHold(MouseEvent):void
{
stage.addEventListener(Event.ENTER_FR… onHold);
//stage.removeEventListener(MouseEven… onHold); //THIS CAUSES AN ERROR
}
**************************************
Why can't I access MouseEvent.MOUSE_DOWN when inside the onHold() function? Also why do I have to import MouseEvent at the beginning of my code, but not Event or Math? I've got a feeling this is related because I can use Event.ENTER_FRAME and Math.cos() just fine while in onHold().
I r =(
***************************************
stage.addEventListener(MouseEvent.MOUS… onHold);
stage.addEventListener(MouseEvent.MOUS… onUp);
function onHold(MouseEvent):void
{
stage.addEventListener(Event.ENTER_FR… onHold);
//stage.removeEventListener(MouseEven… onHold); //THIS CAUSES AN ERROR
}
**************************************
Why can't I access MouseEvent.MOUSE_DOWN when inside the onHold() function? Also why do I have to import MouseEvent at the beginning of my code, but not Event or Math? I've got a feeling this is related because I can use Event.ENTER_FRAME and Math.cos() just fine while in onHold().
I r =(