I’m trying to modify a mouse trailer I’ve found somewhere else so that it only reacts within a specific area on the flash page - say an area 780x549 on a 1024x700 flash file.
Here is the code I am starting with - The file is written in AS2 for Flash 8+
//mouseTrailer
i=0
onMouseMove = function () {
var cur_x = _xmouse;
var cur_y = _ymouse;
var limit = 3;
var min = 30;
var max = 60;
var alfa = 160;
var delta_x = old_x-cur_x;
var delta_y = old_y-cur_y;
var dist = Math.sqrt(delta_xdelta_x+delta_ydelta_y);
old_x = cur_x;
old_y = cur_y;
if (dist>limit) {
i++;
attachMovie(“ball”, “ball”+i, -510+i);
with (this[“ball”+i]) {
var ran = Math.random()*max+min;
var ran2 = Math.random()*alfa-alfa/2;
_rotation = ran2;
_xscale = _yscale=ran;
_x = _parent._xmouse;
_y = _parent._ymouse;
}
}
};
Can anyone please lend a hand? Thank you very much in advance!