sorry, I tacked on that last if statement. It should probably read
if (url.length > 0) {
// begin tooltip code
}
maybe you want to check if its an appropriate web url with a regExp first,
but I think you get the idea.
Ktu
On Tue, Jun 15, 2010 at 9:05 AM, Ktu <[email protected]>wrote:
>
> This in a mouseMove or enterFrame event is what I've always used.
>
>
> var index = txt.getCharIndexAtPoint (txt.mouseX, txt.mouseY);
> var url = "";
> if (index >= 0) {
> var fmt:TextFormat = txt.getTextFormat (index, index + 1);
> if (fmt.url) url = fmt.url;
> }
> if (url) {
> // begin tooltip code
> }
>
> ktu
>
>
>
> On Tue, Jun 15, 2010 at 8:49 AM, Glen Pike <[email protected]>wrote:
>
>> Why not use the mouse coordinates?
>>
>>
>> On 15/06/2010 13:24, 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