Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Text URL link

Status
Not open for further replies.

grovemedia

Technical User
Dec 15, 2003
22
US
When you add text to a frame, is there a way to make the URL Link dynamic. I am using MX 2004. Thanks
 
yeah. there are several ways to get this effect, but let's assume you are talking about a regular text field where you would normally type the URL in the URL Link box in the property inspector...

1) make a text box. you will have to make it "dynamic text" so you can give it an instance name. In this example I will use "myTextField" as the instance name for this text field.

2) choose "render text as html" and make the text unselectable.

3) to assign a URL for this text with actionscript type
Code:
myTextFormat = new TextFormat();
myTextFormat.url = "[URL unfurl="true"]http://www.tek-tips.com";[/URL]
myTextField.setTextFormat(myTextFormat);

(for this exact code to work it would have to sit in the timeline that contains the texfield.)

good luck
 
Thank you so much for the help. It is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top