Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tooltips with variable height

Status
Not open for further replies.

digitalpencil

Programmer
Apr 8, 2001
165
GB
Hi,
I'm currently using tooltips in one of my movies to popup various info on rollover. The length of this information however, varies and therefore I would like to create a tooltip that's height is dynamically assigned by the length of the string.
I am currently using the createEmptyMovieClip with lineTo commands controlling the height and width of my tooltip background, and the createTextField object to pass my strings to. This is working fine, but the size is fixed.

How would I go about modifying my code so that the height of the dynamic textfield is assigned by the length of the string passed to it?

My current code is as follows:
_root.tooltip.tiptext.createTextField("tiptext", 2, 2, 100, 60);
_root.tooltip.tiptext.type = "dynamic"
_root.tooltip.tiptext.multiline = true;
_root.tooltip.tiptext.wordwrap = true;

All help/advice is greatly appreciated,
Thanks,
DigiPencil
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top