I am attempting to have a mc fade in onMouseMove and fade out once the mouse becomes inactive.
close_mc._alpha =0;
mouse_timeoutMS = 2000;
this.onMouseMove = function() {
clearInterval(itvMouseID);
this.onEnterFrame = function() {
if (close_mc._alpha<100) {
close_mc._alpha += 10;
}
};
if (close_mc._alpha == 100) {
delete onEnterFrame;
itvMouseID = setInterval(fade_out, mouse_timeoutMS);
}
};
fade_out = function () {
clearInterval(itvMouseID);
this.onEnterFrame = function() {
if (close_mc._alpha>0) {
close_mc._alpha += 10;
}
};
if (close_mc._alpha == 0) {
delete onEnterFrame;
}
};
FILES
html[url=“http://130public.net/test_area/mouse_move/mouse_move.swf”]
swf
fla (zipped)