Skip navigation
Currently Being Moderated

Dynamic Text box with linking to frames

Jun 19, 2012 11:05 AM

I have a problem. I've tried everything I can think of and what I have Googled, but nothing has helped. I have a scrolling dynamic text box and I need some words in that text box to link to frames, like buttons (Not a URL). This is the file and the frame I'm on is "conflictNorthernPlains"     https://dl.dropbox.com/u/72608572/civilWarEra7.zip

Thanks

 
Replies
  • kglad
    62,058 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 19, 2012 11:49 AM   in reply to John Delamotte

    use htmlText and the textfield's link event:

     

    var tf:TextField = new TextField();

    addChild(tf);

    tf.htmlText = "<a href='event:link 1 text'>link 1</a><br/>";

    tf.htmlText += "<a href='event:link 2 text'>link 2</a><br/>";

    tf.addEventListener(TextEvent.LINK, tfF);

     

    function tfF(e:TextEvent):void{

    trace(e.text);

    }

     
    |
    Mark as:
  • kglad
    62,058 posts
    Jul 21, 2002
    Currently Being Moderated
    Jun 20, 2012 5:59 AM   in reply to John Delamotte

    use:

     

    var tf:TextField = new TextField();

    addChild(tf);

    tf.htmlText = "<a href='event:frame1'>link to  frame1</a><br/>";

    tf.htmlText += "<a href='event:frame2'>link to frame2</a><br/>";

    tf.addEventListener(TextEvent.LINK, tfF);

     

    function tfF(e:TextEvent):void{

    gotoAndStop(e.text);

    }

     

    p.s.  please mark helpful/correct responses, if there are any.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points