caffeinerush
07-23-2006, 03:54 AM
Hi, I followed the gotoAndLearn tooltip tutorial just a little while ago. Reason I'm posting the ques here is gotoandLearn.com is down right now.
The problem is when the code and tooltip are placed inside a movieclip, it does not display at all. It works just fine on the root timeline.
I changed the code from:
tooltip._visible = false;
var tipInt;
b1.onRollOver = function() {
tipInt = setInterval(showTip,100,"Previous Animation");
}
b1.onRollOut = function() {
hideTip();
}
b2.onRollOver = function() {
tipInt = setInterval(showTip,100,"Next Animation");
}
b2.onRollOut = function() {
hideTip();
}
var count = 0;
function showTip(tiptext) {
if(count == 3) {
clearInterval(tipInt);
count = 0;
tooltip.tiptext.text = tiptext;
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse;
tooltip._visible = true;
_root.onMouseMove = function() {
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse;
updateAfterEvent();
}
}
else {
count++;
}
}
function hideTip() {
clearInterval(tipInt);
tooltip._visible = false;
delete _root.onMouseMove;
}
To:
tooltip._visible = false;
var tipInt;
b1.onRollOver = function() {
tipInt = setInterval(showTip,100,"Previous Animation");
}
b1.onRollOut = function() {
hideTip();
}
b2.onRollOver = function() {
tipInt = setInterval(showTip,100,"Next Animation");
}
b2.onRollOut = function() {
hideTip();
}
var count = 0;
function showTip(tiptext) {
if(count == 3) {
clearInterval(tipInt);
count = 0;
tooltip.tiptext.text = tiptext;
tooltip._x = this._parent._xmouse;
tooltip._y = this._parent.[/b]_ymouse;
tooltip._visible = true;
this.onMouseMove = function() {
tooltip._x = this._parent._xmouse;
tooltip._y = this._parent._ymouse;
updateAfterEvent();
}
}
else {
count++;
}
}
function hideTip() {
clearInterval(tipInt);
tooltip._visible = false;
delete _root.onMouseMove;
}
When I changed the target paths (like _root) the tooltip actually showed up, but didn't seem to read where the mouse was going. Like this:
http://www.caffeinerush.net/caffeinerush/A%20image/flashsitescreenshot.jpg
Thanks in advance...
The problem is when the code and tooltip are placed inside a movieclip, it does not display at all. It works just fine on the root timeline.
I changed the code from:
tooltip._visible = false;
var tipInt;
b1.onRollOver = function() {
tipInt = setInterval(showTip,100,"Previous Animation");
}
b1.onRollOut = function() {
hideTip();
}
b2.onRollOver = function() {
tipInt = setInterval(showTip,100,"Next Animation");
}
b2.onRollOut = function() {
hideTip();
}
var count = 0;
function showTip(tiptext) {
if(count == 3) {
clearInterval(tipInt);
count = 0;
tooltip.tiptext.text = tiptext;
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse;
tooltip._visible = true;
_root.onMouseMove = function() {
tooltip._x = _root._xmouse;
tooltip._y = _root._ymouse;
updateAfterEvent();
}
}
else {
count++;
}
}
function hideTip() {
clearInterval(tipInt);
tooltip._visible = false;
delete _root.onMouseMove;
}
To:
tooltip._visible = false;
var tipInt;
b1.onRollOver = function() {
tipInt = setInterval(showTip,100,"Previous Animation");
}
b1.onRollOut = function() {
hideTip();
}
b2.onRollOver = function() {
tipInt = setInterval(showTip,100,"Next Animation");
}
b2.onRollOut = function() {
hideTip();
}
var count = 0;
function showTip(tiptext) {
if(count == 3) {
clearInterval(tipInt);
count = 0;
tooltip.tiptext.text = tiptext;
tooltip._x = this._parent._xmouse;
tooltip._y = this._parent.[/b]_ymouse;
tooltip._visible = true;
this.onMouseMove = function() {
tooltip._x = this._parent._xmouse;
tooltip._y = this._parent._ymouse;
updateAfterEvent();
}
}
else {
count++;
}
}
function hideTip() {
clearInterval(tipInt);
tooltip._visible = false;
delete _root.onMouseMove;
}
When I changed the target paths (like _root) the tooltip actually showed up, but didn't seem to read where the mouse was going. Like this:
http://www.caffeinerush.net/caffeinerush/A%20image/flashsitescreenshot.jpg
Thanks in advance...