Hey. I’m creating a user interface, and it needs to be quite small. So I’ve got the text on some of the pages scrollable, so the user can click on the page and drag it down to view more text.
The problem I have is that when I click ‘next’ (to the next page), rather than the new page animating in and the original one moving out - the new page comes in, but the original one just stays where it is.
However, if I don’t click on the page (therefore not initiating the addeventlistener) and click next, it works fine. So what I think is happening is when I click, the event listener is stopping the page from animating. So basically I think I need to add a removeventlistener, however I’m very new to AS3 - and can’t get it to work.
Here’s the code on the first frame:
var needsgapBind:Rectangle = new Rectangle(0, 57.1, 0, -384);
needs_mc.addEventListener(MouseEvent.MOUSE_DOWN,needsgapDragF);
function needsgapDragF(event:MouseEvent):void{
needs_mc.startDrag(false, needsgapBind);
}
So what do I need to do in order to remove the event listener when the mouse button is released? (If that is the problem).
Thanks