search for: boundupdateposition

Displaying 1 result from an estimated 1 matches for "boundupdateposition".

2007 Oct 04
0
Getting mouse position from a timed function - My Solution
...here in case in can help anyone else. I built a little class to help me do just that. Here is my implementation: (using Prototype 1.6) var pointerTracker = Class.create({ initialize: function(){ this.x = null; this.y = null; this.bodyEl = $(document.body); //Bind event listener. this.boundUpdatePosition = this.updatePosition.bindAsEventListener(this); this.start(); }, updatePosition: function(event){ this.x = event.pointerX(); this.y = event.pointerY(); }, start: function(){ this.bodyEl.observe(''mousemove'', this.boundUpdatePosition); }, stop: function(){ this.bod...