This is a simple example code for using the Eyeblaster MouseTracker component I have added some additional functionality and quotes to explain how it works.
/*
MouseTracker Example (300x250 Panel) - Kurt Grung 3L3373.com
Usage: Drop a MouseTracker component to the stage and give it a instance name of "mouseTracker" no quotes.
*/
mouseTracker.onMouseMoveXY = mouseTrackerFunction; //This basically calls the MouseTrackFunction below every time the mouse is moved.
function mouseTrackerFunction(nXPos, nYPos, nRelXPos, nRelYPos) {
if (nRelXPos<0 || nRelXPos>300 || nRelYPos<0 || nRelYPos>250) {
//Wait Timer - if you wanted to add a delay before the panel shutdown.
wait = function(){
clearInterval(waitCall); //Kills the wait call so doesn't loop.
EB.CollapsePanel("exp"); //Closes Panel down "exp".
}
waitCall = setInterval(wait, 1*1000); // 1*1000 = 1 Second.
//Or you could comment out the above and call a function to start a end animation sequence rather.
} else {
//Do something?
}
}














