[quoted text, click to view] > even if the mouse isn't over the banner the cursor still blinks and shows, how can this be eliminated? i dont know the code but may be with some unload movie after the mouse has been put out???
give it a timer . if there is no mouse activity , turn off the visibility , if the mouse is moving again
show the draggable .
onClipEvent (mouseMove) {
t0 = getTimer();
}
onClipEvent (enterFrame) {
if (getTimer()-t0>=10000) {
trace ("idle for 10 seconds");
// your action here to play things
}
}
This method however is not as neat as it could be .
See , it will continue to kick of the action every following 10 seconds of idle.
Bad idea definitely ...
So i made one more version :
onClipEvent (load) {
this.idle = true;
ox = _root._xmouse;
}
onClipEvent (mouseMove) {
if ((ox != _root._xmouse) || (oy != _root._ymouse)) {
// trace("moved");
ox = _root._xmouse;
oy = _root._ymouse;
t0 = getTimer();
if (this.idle) {
this.idle = false;
// trace("setting to false");
this._visible=1;
}
}
}
onClipEvent (enterFrame) {
if ((getTimer()-t0)>=5000) {
if (!this.idle) {
trace("idle for 5 seconds");
this.idle = true;
this._visible=0;
// or some other action
}
}
}
What happen here - the idle is check based on Xmouse move ,
if the mouse chill for 5 seconds it kick of the idle script and call action like
this._visible=0; or whatever is that you want to do.
Once the action it called it will cancel the idle script till you next mouse move.
So it does not continue counting every following 5 seconds .
Neat and CPU friendly compare to first version.
Regards
urami_*
<lsym>
There's no place like 127.0.0.1