I'm trying to find out what is similar to the alt tag for html in flash 5, 6 or 7. For instance when you go to an HTML site and scroll over a link it will also display a description using the alt tag. I also know that this can be done using java scripting.
What i want to acomplish is for a description (either a MC or a grapic) to pop up when clicking on an icon and follow the mouse as long as the button is hoovered.
Or if you have any better idea i can display a link discription when hoovering over an icon... ideas appreciated... this is for my personal website that i do as a hobby...
I did a custom tooltip you can use. It will serve the same purpose but it might be a bit messy
keep in mind that all your graphics will need to be in a MC with an instace name in order for this to work.
code:
//<---- tool tip ---->
// Designed and Modified by Sleeve
// Just because you changed the code, that doesn't mean you made it!
toolTipStyle = new TextFormat();
toolTipStyle.font = "Arial";
toolTipStyle.size = "10";
// Change this array!
tipArray = new Array([Object1NameHere, "Message to display here"],[Object2NameHere, "Message to display here"]) //...and so on...
for (j=0; j<tipArray.length; j++) {
tipArray[j][0].setStyleProperty("embedFonts", true);
tipArray[j][0].setStyleProperty("textFont", "Font 1");
tipArray[j][0].numID = j;
tipArray[j][0].onRollOver = tipArray[j][0].onDragOver=function () {
intv0 = setInterval(createField, 1500, this.numID); //Set your delay time here!
function createField(display) {
_root.createTextField("tt_txt", 2, _root._xmouse+15, _root._ymouse+10, 120, 0);
_root.tt_txt.autoSize = true;
_root.tt_txt.multiline = true;
_root.tt_txt.wordWrap = true;
_root.tt_txt.selectable = false;
_root.tt_txt.border = true;
_root.tt_txt.background = true;
_root.tt_txt.backgroundColor = 0xFFFFCC;
_root.tt_txt.embedFonts = true;
_root.tt_txt.setNewTextFormat(toolTipStyle);
_root.tt_txt.text = tipArray[display][1];
fieldHeight = _root.tt_txt._height+_ymouse+10;
fieldWidth = 120+_xmouse+15;
if (_root.tt_txt._height+_ymouse+10>400) {
_root.tt_txt._y = _root._ymouse-30;
} else if (fieldWidth>550) {
_root.tt_txt._x = _root._xmouse-125;
}
clearInterval(intv0);
_root.onMouseMove = function() {
fieldHeight = _root.tt_txt._height+_ymouse+10;
fieldWidth = 120+_xmouse+15;
_root.tt_txt._x = this._xmouse+15;
_root.tt_txt._y = this._ymouse+10;
if (fieldHeight>400) {
_root.tt_txt._y = this._ymouse-30;
} else if (fieldWidth>550) {
_root.tt_txt._x = _root._xmouse-125;
}
updateAfterEvent();
};
}
};
tipArray[j][0].onDragOut = tipArray[j][0].onRollOut=function () {
_root.tt_txt.removeTextField();
tipArray[j][0].onRollOver = null;
clearInterval(intv0);
};
}
//<---- end ---->
Cheers!
Last edited by Sleeve; 01-28-2004 at 01:39 AM.
Just because you changed the code, doesn't mean it's yours
wow... you guys are the best...
I like both methods... and will try both..
I was just expecting some guidance on where to look... but you both supplied me with the answer...
Thanks
I'm almost tempted to ask more questions...
nah that would be pushing it...