Skip to main content
Participant
July 30, 2009
Question

createTextLinesFromString hyperlinks

  • July 30, 2009
  • 1 reply
  • 1113 views

hi all

im useing createTextLinesFromString to put text in a box

there are hyperlinks in the text

how can i make the hyperlinks clickeble and underlined?

is there an automatic way to do it?

10x

dan shamir

This topic has been closed for replies.

1 reply

Participating Frequently
July 30, 2009

Hi,

Lines created by the text line factory are static and do not support user interaction. You'd have to use the standard flow composer.

Abhishek

(Adobe Systems Inc.)

djtoon101Author
Participant
July 30, 2009

well i did that

but how do i tell the the textlayout to undrline links

example

i get a string like this: "hi all go to my page http://www.ddd.com";

i put it in a textflow but it dosent underline it.


var bbb=new MovieClip();
span.text = txt;
textFlow.hostCharacterFormat = charFormat;



textFlow.paragraphFormat = para;

paragraphElement.addChild(span);

textFlow.addChild(paragraphElement);
textFlow.flowComposer = new StandardFlowComposer();

textFlow.flowComposer.addController(new DisplayObjectContainerController(bbb,290,50)); //target, width, height

//textFlow.interactionManager = mainSelectionManager;
textFlow.flowComposer.updateAllContainers();
addChild(bbb);

any help?

Participating Frequently
July 30, 2009

Hi,

You'll need to use a LinkElement.

For your example, the paragraph will contain a SpanElement (for "hi all go to my page ") and a LinkElement (with the href set to "http://www.dd.com"). The LinkElement itself will contain a SpanElement for the URL display text ("http://www.dd.com")

Abhishek