PDA

View Full Version : mouse movement array


diggz
12-22-2005, 01:44 PM
Hi All,

Does anyone know how I can generate arrays from the mouse movement of my cursor.

I need to create some x & y arrays from the position of the cursor as it moves around the stage - does anyone know how I can do it?

Not so much a case of recording the mouses movement within the movie more collecting the data from it to use elsewhere? Does that make sense? - hope so.

Really appreciate any help folks

;)

Billy T
12-22-2005, 01:50 PM
pos=new Array()
this.onMouseMove=function(){
tmp=new Object();
tmp.x=_xmouse
tmp.y=_ymouse;
pos.push(tmp);
for(i=0;i<pos.length;i++){
trace(i+'_x='+pos[i].x);
trace(i+'_y='+pos[i].y);
}
}

diggz
12-22-2005, 01:56 PM
....oooooooooooh baby baby!!!!

absolutely perfect amigo :))

Thanks very much.

Billy T
12-22-2005, 01:59 PM
welcome