|
-
Selection.setFocus() - not showing cursor
Hello,
Need to understand how the cycle of events occur on a single frame movie clip. Could someone give me a brief summary of what happens when I have a movie clip with two text boxs and two buttons.
The first button clears the boxes and second button sets focus to first text box, and set the text to 'home'.
The text in the first box is briefly selected and then the highlighted selected text disappears, but the text 'home' remain in the box and my focus says I'm in the first box, but I don't see a cursor in the first box. I understand the movie clip is cycling through it's events. But what events I'm not clear on.
If anyone can expand on the events occuring it would be a great help.
Simple action script:
btn1.onPress=function(){
txt1.text='';
txt2.text='';
};
btn2.onPress=function(){
Selection.setFocus("_root.txt1");
txt1.text='home';
}
-
KoolMoves Moderator
Not ignoring you, just haven't figured it out.
-
Hi,
if you want to see the cursor at the end of the word 'home' try this:
Code:
btn1.onRelease = function() {
txt1.text = '';
txt2.text = '';
}
btn2.onRelease = function() {
txt1.text = 'home';
Selection.setFocus("_root.txt1");
Selection.setSelection(_root.txt1.text.length,_root.txt1.text.length);
}
Last edited by kutyamutya; 01-06-2008 at 06:55 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|