ActionScript a:hover Event

 Feb, 23 - 2009   1 comment   Uncategorized

The only (easy) way to do a:hover styles is to apply a styleSheet. You don’t get an event though, you just get a style change from the regular <a> style to the a:hover style.

I was hoping to find a way to set the window status message like you’d get in HTML. And I did find a way, even though implementing it will mean another trip into the dark world of HTML-as-XML parsing.

If (that’s a mighty big if) you know the character indexes for your link characters, you can use TextField.getTextFormat and the Enter_Frame event to determine whether the link is in one color state or the other. Now the only problem is…figuring out those character indexes. It doesn’t take an ActionScript whiz to figure out that your TextField.htmlText won’t match your TextField.text; depending on your tags (and your whitespace, whitespace settings, etc) finding those indexes could be a major pain … worthy of another post.

Related articles

 Comments 1 comment

  • Joe says:

    maybe just check the url property on the returned textformat?


  • Leave a Reply

    Your email address will not be published. Fields with * are mandatory.