I'm trying to write code to allow the user to drag things and am having problems figuring out the proper way to do this.

Do I initially only turn on dragStart, then turn on dragging and dragEnd inside the dragStart call back or turn all 3 on all at once?

Currently, I turn on dragging and dragEnd when I get a callback to the DragStart function. The dragging seems to work fine but I don't get the dragEnd callback when I lift up. Then, if I keep playing with it, I will get multiple dragEnd callbacks at once (like 3). Very strange.

Setup:
Code:
this.controller.listen($('display'), Mojo.Event.dragStart, this.dragScreen.bindAsEventListener(this));
DragStart:
Code:
ScrollerAssistant.prototype.dragScreen = function(event) {
	this.controller.stopListening($('display'), Mojo.Event.dragStart, this.dragScreen.bindAsEventListener(this));
	this.controller.listen($('display'), Mojo.Event.dragging, this.draggingScreen.bindAsEventListener(this));
	this.controller.listen($('display'), Mojo.Event.dragEnd, this.dragEndScreen.bindAsEventListener(this));
}
Dragging:
Code:
ScrollerAssistant.prototype.draggingScreen = function(event) {
	this.leftPosition = this.rememberPosition + event.move.x;
}
DragEnd:
Code:
ScrollerAssistant.prototype.dragEndScreen = function(event) {
	this.controller.stopListening($('display'), Mojo.Event.dragging, this.draggingScreen.bindAsEventListener(this));
	this.controller.stopListening($('display'), Mojo.Event.dragEnd, this.dragEndScreen.bindAsEventListener(this));
}
Anybody have some experience coding the dragging?