I am trying to use the Flash MX 2004 Hover Caption tutorial to create tool tips for certain parts of my movie. I am struggling to get the text to display multiline. Has anyone tried this or know how to tweak the code? I have tried setting the dynamic text field to multiline but that didn’t work. I tried using /r or /n for carriage returns but also had no luck. Even rendering th etext field as HTML an dusing <br> tags didn’t seem to do the trick.
This is the relevant actionscript from the tutorial…
[SIZE=3][FONT=Times New Roman][/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]b1.onRollOver = function() { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]captionFN(true, “A bunch of text here that needs to be displayed on more than one line.”, this); [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]this.onRollOut = function() { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]captionFN(false); [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]}; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]}; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]captionFN = function (showCaption, captionText, bName) { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]if (showCaption) { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]_root.createEmptyMovieClip(“hoverCaption”, this.getNextHighestDepth()); [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap.desc.text = captionText; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._width = 7*cap.desc.text.length;[/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._alpha = 75; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]// [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]if ((bName._width+bName._x+cap._width)>Stage.width) { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]xo = -2-cap._width; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]yo = -17; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]} else { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]xo = 2; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]yo = -17; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]} [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]hoverCaption.onEnterFrame = function() { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._x = _root._xmouse+xo; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._y = _root._ymouse+yo; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._visible = true; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]}; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]} else { [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]delete hoverCaption.onEnterFrame; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]cap._visible = false; [/FONT][/SIZE]
[SIZE=3][FONT=Times New Roman]} [/FONT][/SIZE]
[FONT=Times New Roman][SIZE=3]};[/SIZE][/FONT]