Did you know that for htmlText using <a> you can specify the
href="event:myText"
Then register a TextEvent. This is how links inside of text fields can
trigger functions

http://help.adobe.com/en_US/AS3LCR/Flash_10.0/flash/text/TextField.html#htmlText

Ktu

On Tue, Jun 15, 2010 at 12:14 PM, Karim Beyrouti <[email protected]> wrote:

> Yep... However I was trying to get roll overs to trigger a function. Am
> going to build a textfield roll over utility class... Will post the results
> here when it's done...
>
> Thanks...
>
> Karim
>
>
>
>
> On 15 Jun 2010, at 16:08, Kevin Newman <[email protected]> wrote:
>
>  a:hover works in a css style sheet:
>>
>> var ss:StyleSheet = new StyleSheet();
>> ss.parseCSS("a:link{color: #0000FF;}a:hover{text-decoration:
>> underline;color: #FF0000;}");
>> var tf:TextField = new TextField();
>> tf.autoSize = TextFieldAutoSize.LEFT;
>> tf.styleSheet = ss;
>> tf.htmlText = '<p>A link: <a href="http://www.unfocus.com";>unFocus
>> Projects</a></p>';
>> addChild(tf);
>>
>>
>> Kevin N.
>>
>>
>>
>> On 6/15/10 8:24 AM, Karim Beyrouti wrote:
>>
>>> Hi All -
>>>
>>> Wondering if there are any hacks to trigger a 'RollOver' script when
>>> hovering over a 'a href' link in an html textfield.
>>> Currently using TextEvent.LINK,to trigger links - but would like to show
>>> a tooltip on rollover (of that part of text).
>>>
>>> So far the only solution i can think of is using :
>>> TextField.getCharIndexAtPoint(x:Number, y:Number)
>>> create this  - but it seems like this could be quite long winded
>>> solution.
>>>
>>> Any other ways of achieving this?
>>>
>>>
>>> Thanks
>>>
>>>
>>>
>>> Karim _______________________________________________
>>> Flashcoders mailing list
>>> [email protected]
>>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>>
>>>
>> _______________________________________________
>> Flashcoders mailing list
>> [email protected]
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
> _______________________________________________
> Flashcoders mailing list
> [email protected]
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to