I have a dynamic tooltip created through actionscript that shows up when moused over certain objects…the depth works fine for all the buttons on the stage meaning it appears on top of whatever I am mousing over…then I have a booth info mc which is taken from the library…this mc has tabs that should have the tool tip when moused over…what occurs is the tooltip shows up behind the booth info mc and tabs…any ideas?
tool tip creation/placement function
function showToolTip(cap, targetObj)
{
if(mouseIsOver && !isPressed)
{
txtwidth = cap.length*5;
_root.createTextField("my_txt", targetObj.getNextHighestDepth(), 5, 30, txtwidth, 10);
_root.my_txt.border = true;
_root.my_txt.borderColor = 0xFFffff;
_root.my_txt.background = true;
_root.my_txt.backgroundColor = 0x000000;
_root.my_txt.autoSize = true;
var my_fmt:TextFormat = new TextFormat();
my_fmt.font = "Arial";
my_fmt.color = 0xFFffff;
my_fmt.align = "center";
_root.my_txt.setNewTextFormat(my_fmt);
_root.my_txt.embedFonts = true;
if(doIt)
{
_root.my_txt._alpha = 0;
doIt = false;
}
_root.my_txt.text = cap;
targetObj.onEnterFrame = function()
{
if(_root.my_txt._alpha < 90)
{
_root.my_txt._alpha += 10;
}
if (_root._xmouse <= _root._width-txtwidth-20)
{
_root.my_txt._x = _root._xmouse + 15;
}
else
{
_root.my_txt._x = _root._xmouse - txtwidth - 10;
}
var ymax = _root._height - 20 - _root.my_txt._height;
if (_root._ymouse <= ymax)
{
_root.my_txt._y = _root._ymouse + 15;
}
else
{
_root.my_txt._y = _root._ymouse - _root.my_txt._height - 10;
}
}
}
}
then the function call from the booth info mc that is in the library…
tab1Text.onRollOver = function()
{
if(!this.tabOpen)
{
_root.mouseIsOver = true;
this._alpha = 50;
myInterval = setInterval(_root.showToolTip, 500, "View Company Contact Info", this);
}
}
in the function call I am passing the caption I want displayed and the reference to the object in question…this should work…why does it not work?