I think your problem is that stage=null. The reason can by only one: you trying to get to stage, when the MC is not added to it (then the reference is null).
Konrad
2009-10-07 17:21:41
I think your problem is that stage=null. The reason can by only one: you trying to get to stage, when the MC is not added to it (then the reference is null).
I agree with Konrad, also.. it is better practice to initiate the MOUSE_UP event when the MOUSE_DOWN event is captured.
so move the
stage.addEventListener(MouseEvent.MOUSE_UP, rollerUp);
inside of the rollerDown function.
Your stage is null because the newly created object is not yet on the stage. To get around this, use an ADDED_TO_STAGE listener in the constructor which then adds your stage events.
thanks,
this fixes the Problem for me.
So add Listener for Mouse_up inside the Mouse_down function and it works.
thanks a lot