Skip to main content
Inspiring
March 8, 2009
Answered

rollOver effect on a link element

  • March 8, 2009
  • 3 replies
  • 575 views
Sorry to be a dim bulb. I've looked at doc and examples, out there by can't seem to get a rollOver effect to happen on a link element. I have tried this
var myText:String =
"<TextFlow xmlns=' http://ns.adobe.com/textLayout/2008' fontFamily='Arial' fontSize='12' textIndent='15' marginBottom='15' paddingTop='4' paddingLeft='4'>" +
"<CharacterFormat id='hoverOverLink' color='0xff0000'/>" +
"<p><span>Here is a test of a </span>" +
"<a id='word_id' href='WORD' linkHoverFormat='hoverOverLink'><span fontStyle='italic'>word</span></a>" +
"</p></TextFlow>";

Also I'm wondering what is the best way to get the quality smooth anti-aliased text that you get when you use static text in the Flash authoring tool.

Thanks very much in advance for help with this.
This topic has been closed for replies.
Correct answer rdermer
In the posted TextLayoutComponent for CS4 I believe you'd need {}s around hoverOverLink like this linkHoverFormat='{hoverOverLink}'

This changed quite a bit in TLF build 370. In that build the markup would be:
<TextFlow fontSize="12" verticalAlign="inherit" paddingBottom="inherit" paddingLeft="4" textIndent="15" paddingRight="inherit" fontFamily="Arial" paddingTop="4" lineBreak="inherit" marginBottom="15" whiteSpaceCollapse="preserve" xmlns=" http://ns.adobe.com/textLayout/2008"><p><span>Here is a test of a </span><a id="word_id" href="WORD"><linkHoverFormat color="0xff0000"/><span fontStyle="italic">word</span></a></p></TextFlow>

Richard

3 replies

Adobe Employee
March 9, 2009
If the field is editable press the ctrl key while hovering.
SPGAnneAuthor
Inspiring
March 8, 2009
Richard - thanks...tried what you suggested, when I move my mouse over the link I still don't get a color change.
rdermerCorrect answer
Adobe Employee
March 8, 2009
In the posted TextLayoutComponent for CS4 I believe you'd need {}s around hoverOverLink like this linkHoverFormat='{hoverOverLink}'

This changed quite a bit in TLF build 370. In that build the markup would be:
<TextFlow fontSize="12" verticalAlign="inherit" paddingBottom="inherit" paddingLeft="4" textIndent="15" paddingRight="inherit" fontFamily="Arial" paddingTop="4" lineBreak="inherit" marginBottom="15" whiteSpaceCollapse="preserve" xmlns=" http://ns.adobe.com/textLayout/2008"><p><span>Here is a test of a </span><a id="word_id" href="WORD"><linkHoverFormat color="0xff0000"/><span fontStyle="italic">word</span></a></p></TextFlow>

Richard