This content has been marked as final.
Show 6 replies
-
1. Re: Problem with text-cursor in text field
Greg Dove Nov 14, 2007 8:32 AM (in response to DanelKirch)Assuming your textfield has focus, you can do this with the Selection object.
to check the position of the cursor in the textfield
http://livedocs.adobe.com/flash/9.0/main/00002111.html#wp455762
to set the position:
http://livedocs.adobe.com/flash/9.0/main/00002117.html#wp457836 -
2. Re: Problem with text-cursor in text field
DanelKirch Nov 14, 2007 8:42 AM (in response to Greg Dove)Thanx GWD!
I can see where you going at, it will keep me busy for a moment :) -
3. Re: Problem with text-cursor in text field
DanelKirch Nov 14, 2007 9:18 AM (in response to Greg Dove)question again,
at the moment im testing out these codes.
this code here...
on (release) {
if (newEntry == ''){
nyttpost_movie.nyttpost.text = "<b>";
} else {
nyttpost_movie.nyttpost.text = newEntry+"<b>";
selection.setFocus("nyttpost_movie.nyttpost.text");
selection.getEndIndex("nyttpost_movie.nyttpost.text");
}
}
it should work, right?
i cant see what im missing here :S -
4. Re: Problem with text-cursor in text field
Greg Dove Nov 14, 2007 9:25 AM (in response to DanelKirch)I'm not sure exactly what you want... and this is a quick guess but try something like:
if (newEntry == ''){
nyttpost_movie.nyttpost.text = "<b>";
Selection.setFocus("nyttpost_movie.nyttpost.text");
Selection.setSelection(3,3); //I think this should be after the <b>
} else {
nyttpost_movie.nyttpost.text = newEntry+"<b>";
var len = nyttpost_movie.nyttpost.text.length;
Selection.setFocus("nyttpost_movie.nyttpost.text");
Selection.setSelection(len,len); //I think this should be after the <b>
}
-
5. Re: Problem with text-cursor in text field
DanelKirch Nov 14, 2007 9:35 AM (in response to Greg Dove)Thanx again GWD!
always amazing in solving problems!
it worked just perfectly ! -
6. Re: Problem with text-cursor in text field
Greg Dove Nov 14, 2007 10:20 AM (in response to DanelKirch)no problems. Good luck with it.

