So I've got this stuff in a class
startMove: function(el){
el.addEvent('mousemove',this.move(el,event));
},
move: function(el,event){
el.setStyles({
'left': event.page.x-(el.getSize().x/2),
'top': event.page.y-(el.getSize().y/2)
});
},
stop: function(el){
el.removeEvent('mousemove',this.move);
}
But it doesn't work ... Result of expression 'event' [undefined] is
not an object.
I know there's a syntax thing going on here. How do I send that event
object into the move function?
I had this working when the whole move function's code was nested
inside the startMove function. But then I couldn't remove the event.
Thanks!
Ryan Florence
http://ryanflorence.com/blog/