You can use a:hover in a flash.text.StyleSheet.

 

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";

layout="vertical" >

 

<mx:Script>

<![CDATA[

 

private var hoverStyles:String = "a:hover { color: #ff00ff;
text-decoration: underline; } a { color: #00ffff; text-decoration:
underline; }";

private function setup():void

{

            var ss:StyleSheet = new StyleSheet();

            ss.parseCSS(hoverStyles);

            ta.styleSheet = ss;

}

]]>

</mx:Script>

 

<mx:TextArea id="ta" width="200" initialize="setup()" >

            <mx:htmlText>

            <![CDATA[

                        <p>this is a <a
href='http://www.addictinggames.com/theurinalgame.html'>test</a> of
a:hover</p>

            ]]>

            </mx:htmlText>

</mx:TextArea>

 

</mx:Application>

 

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Anuj Gakhar
Sent: Monday, March 24, 2008 1:33 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Mouseover Underline on Text

 

I have tried all text controls, TextField, Text, Label etc...
The only way to achieve an text underline on mouseover is by adding
Rollover and RollOut Event listeners and then changing the styles on the
fly...and its more of a pain if the stylesheet happens to be an external
stylesheet....

Sounds like too much work to me.....is there not an easier way to do
this simple thing? 

  

________________________________

Looking for last minute shopping deals? Find them fast with Yahoo!
Search.
<http://us.rd.yahoo.com/evt=51734/*http:/tools.search.yahoo.com/newsearc
h/category.php?category=shopping> 

 

Reply via email to