Daemonite: Tooltip Component Depth Issues Archive

Daemonite: Tooltip Component Depth Issues Archive


Friday, June 27, 2003
Tooltip Component Depth Issues

In my previous post, Extending DRK3's TextField Component, I discussed adding a Tooltip (FUI Set 3) to the icons displayed to give them more meaning.

While it is a very engaging way to build forms in Flash you must be aware of a depth bug in the Tooltip component code that causes the tip to appear as a black box. Fortunately I have a fix for that.

This comes from Scott Mebberson, the Australian developer of the Tooltip component.

You'll have to have a copy of the Tooltip in your Library before you do this.

Open the Tooltip by double clicking it in the Library, from the Actions panel make the two following sets of changes (line numbers shown are approximate) to the code:

---- CHANGE ONE ------------------------------------------

FROM ---

117: this.styleTable = _root.toolTip_mc.styleTable = new Array();
118: this.specificStyles = _root.toolTip_mc.specificStyles = new Array();

TO ---

117: if (!_root.toolTip_mc.styleTable) this.styleTable = _root.toolTip_mc.styleTable = new Array();
118: if (!_root.toolTip_mc.specificStyles) this.specificStyles = _root.toolTip_mc.specificStyles = new Array();

---- CHANGE TWO ------------------------------------------

FROM ---

129: if (this.faceColor != 16777185) this.intervalID = setInterval(this, "applyInitStyle", 1, this.faceColor);
130: if (this.txtColor != 0) this.setStyleProperty("textColor", this.txtColor);

TO ---

129: if (this.faceColor != 16777185 && this.faceColor != undefined) this.intervalID = setInterval(this, "applyInitStyle", 1, this.faceColor);
130: if (this.txtColor != 0 && this.txtColor != undefined) this.setStyleProperty("textColor", this.txtColor);

And that should do it.

Posted by at 07:30 AM | Permalink
Trackback: http://blog.daemon.com.au/cgi-bin/dmblog/mt-tb.cgi/135

Comments

I just found this bug, googled it, and found your site right away. Thanks for the fix!

Posted by: Josh Trefethen on July 10, 2003 03:55 AM

Brilliant fix. Thanks for sharing. The dark tooltip was crimping my style.

Posted by: dj vanya on August 12, 2003 02:26 AM