Ooops - my bad, it wouldn't be AS1 or 2 in Flex, I thought this was
posted on a Flash list. For AS3, check out TextEvent.LINK. Here is a
quick sample I googled:
var linkText:TextField = new TextField();
linkText.htmlText = 'Link: <a href="event:Link Clicked">Click</a>';
addChild(linkText);
linkText.addEventListener(TextEvent.LINK, linkEvent);
function linkEvent(event:TextEvent):void {
trace(event.text); // Link Clicked
}
Jason Merrill
Bank of America
GT&O L&LD Solutions Design & Development
eTools & Multimedia
Bank of America Flash Platform Developer Community
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of Merrill, Jason
Sent: Friday, February 15, 2008 7:56 AM
To: [email protected]
Subject: RE: [flexcoders] Buttons in text
Which version of Actionscript? If you mean 1 or 2, read up on
asfunction.
Jason Merrill
Bank of America
GT&O L&LD Solutions Design & Development
eTools & Multimedia
Bank of America Flash Platform Developer Community
________________________________
From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of tvikatos
Sent: Friday, February 15, 2008 5:31 AM
To: [email protected]
Subject: [flexcoders] Buttons in text
I want to have text, where specific words act like
buttons, i.e. when
clicked dispatch an event. Something like hyperlinks
that instead of
opening up web pages, do whatever I want them to do.
Any idea how to achieve this?