Can anyone help?
I am creating a “note pad” feature of an educational CD-Rom in Flash.
The note pad allows the user to type notes into an input text field, as well as bookmark
the current screen of the CD-Rom that they are on. The bookmark appears as a link within
the body of text the user has typed into the text field. The input text field is set to
HTML enabled, and the link text is added by the code:
noteBody_txt.htmlText += “<a href=“asfunction:displayPage,” +theSection + “|” +
thePage + “”><u>” + pageHeading + "</u></a> ";
Clicking the link sends the CD-Rom to the appropriate bookmarked page, and this all
works fine, except…
The bookmark link always goes onto a new line. What I need is to be
able to insert the bookmark link in the middle of a sentence, for example.
I have messed around with Selection.getCaretIndex() and selection.setSelection() to no
avail.
Can anyone think how to get the link to be added at the current insertion point and not on
a new line? I thought that maybe the problem is that I am adding text dynamically to an
input field, not a dynamic field?