The issue is not the interval but the rollOver. when you move your
mouse, the tooltip MC is not immediately moved and you roll over it (so
you got the
I-beam cursor) when it is moved the rollOver function is called again
and the interval is launched again.
You only have to put _root.tooltip.onMouseMove instead of
_root.tooltip.onEnterFrame and it will be ok (until the user don't move
the mouse too fast)
Mendelsohn, Michael a écrit :
Hi list...
//Happy new year!
I have a tooltip function that makes a tooltip MC follow the mouse over
when rolling over another MC, but it gets blown out after two frames,
and the mouse turns to an I-beam cursor. I can't figure out why. I
*don't* think it's a setInterval issue, but I might be wrong.
Curiously, the onEnterFrame function works only when I *don't* set the
_x property of the tooltip MC.
Any feedback is appreciated.
- Michael M.
class toolbarFunctions extends MovieClip {
private var tipID:Number;
function toolbarFunctions() {
}
function onRollOver():Void {
this.tipID = setInterval(this, "displayTip", 1000);
}
function displayTip():Void {
// create text container...
_root.createEmptyMovieClip("tooltip", 20);
_root.tooltip.createTextField("tip", 1, 0, 0, 100, 100);
_root.tooltip.tip.text = "tooltip";
// make text follow mouse...
_root.tooltip.onEnterFrame = function():Void {
var coord:Object = {xx:_root._xmouse,
yy:_root._ymouse};
this._x = coord.xx;
this._y = coord.yy;
//this._x = _root._xmouse;
//this._y = _root._ymouse;
//_root.tooltip._x = _root._xmouse;
};
clearInterval(this.tipID);
}
}
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_________________________________________________________________
Live.com: le nouveau moteur de recherche par Messenger!
http://www.windowslive.fr/livecom/
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com