How do I make Flash dynamic text field <a> links fire events on mouseover?

Question says it all really, but I don't mind if any answers are AS2 or AS3 solutions, just curious really - seems weird that I couldn't find out how to do this really quickly.

Answers


AS2

If your using a dynamic text field I assume your filling it with html content. Since this is pure html inside the field it doesn't have a relation between the event model and the html. You need to have an object to access the event model in AS2.

AS3

But in AS3 you can use the event keyword in the href.

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html#event:link

http://troyworks.com/blog/2008/03/14/flash-textfield-actionscript-hyperlink-in-as30/


Can't you add an event listener to it? Or perhaps set the htmlText's event and handle the event as it arises. Some information can be found here and also here.


Need Your Help

Authorize.NET maximizing successful transactions

authorize.net

We are using Authorize.NET (AIM + CIM) to process credit cards. Recently I noticed that we are getting many declined payments in transaction log. Most of them are with status "decliner by issuer", ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.