PDA

View Full Version : Selection.getFocus = null...for like a second


Linnium
03-09-2007, 06:52 PM
Hey,

Been a while since I posted a chin scratcher. This one is lame, but I do need to find a solution.

I don't know if any of you have run into this issue, but I have a stage where there are input text boxes and buttons. If I click a button, like a custom Next button for pictures, i can click it all day with no issues. If I click an input text field, and then click the button again, I can't click the button until I move the mouse. The reason is that the focus is still on the text field.

So, I used the example given by Flash for Selection.setFocus, and made it a function for when the Next button is clicked, setting the focus to null. If I copy and paste the example exactly, it works. When I apply it to my already existing FLA, it does not.

Frustrated, I added a listener to Selection and listened for onSetFocus, running a trace each time. I click on the text box, and it spits out _level0.name_txt as the focused item. If I then click outside the box, I get null, and then less than a second later, it spits out _level0.name_txt again. GRRR!

I'm wondering if one of the components on the stage is causing a problem since the tend to be buggy. I have a UIScroller and an FLVPlayback component on the stage, and I need them to remain.

I'm at a loss. Does anyone have any insight on this? Thanks!

Linnium
03-09-2007, 08:35 PM
LOL, I guess no one likes my problem.