making dynamic text clickable

I'm loading external data (text) into a TextArea and now I want to make parts of that text clickable. What is the best way to make text in a TextArea trigger an action, specifically a call to setMedia()? Is there a way for HTML anchor tags to trigger events within a Flash file? Or some other approach?

This is for a playlist that goes with a custom video player. The playlist TextArea will be in the same .swf file as the video player component.
LVL 6
merwetta1Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

blue-genieCommented:
Hi, i'm not sure what version of flash you're using, but there's the good ol asFunction that always works a charm for me...

from help files...

function MyFunc(arg){ //replace with your setMedia() method
  trace ("You clicked me! Argument was "+arg);
}
myTextField.htmlText ="<A HREF=\"asfunction:MyFunc,Foo \">Click Me!</A>";

how are you loading ur text, using LoadVars? simply swap out the text above into your txt file.
should do the trick.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
merwetta1Author Commented:
asfunction is what I was looking for. thanks.

I want to display the dynamic data in a TextArea so the scrollbars will be handled for me. However, a TextArea component makes its embedded TextField a child of the current timeline. I figured out that if you want to use the asfunction protocol in a TextArea, you need to add "_parent." to the function name...

myTextArea.text ='<A HREF="asfunction:_parent.MyFunc,Foo">Click Me!</A>';
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.