View Full Version : How to use "focusManager.setFocus" ?

05-10-2004, 09:43 AM
I have put "focusManager.setFocus(mytextfield);" in the first frame of my fla movie. But I cannot see the blinking cursor in the textfield component.

What should I do in order to use this feature ?

Thanks a lot for any helping hands...

Billy T
05-10-2004, 09:57 AM

05-10-2004, 11:09 PM
Hi, Billy

I have tried your suggestion but still not worked. Is it applicable to components ? Or should I place it inside a function which listen to some event ?

Thanks a lot for your helps...

Billy T
05-10-2004, 11:38 PM
worked fine with the text input component

which component are you using?

05-11-2004, 01:02 AM
I am using the text input component from the UI components of Flash MX Pro 2004. Should I just put that line in the first frame only ?

Thanks again for your helps.

Billy T
05-11-2004, 01:08 AM

see attached

05-11-2004, 06:58 AM
I have tried your file but still not worked. But I found a strange thing... If I create a button and add the line inside the onRelease function(), it will work normally.

Any idea on this problem ? I have tested the file in both PC and Mac (also in different browser...). The result is the same.

Thanks a lot for your helps

05-11-2004, 07:33 AM

06-11-2004, 02:26 PM

this's my solution:

06-13-2004, 02:34 AM
but this is a different issue
the Manual saysAll components implement FocusManager support; you don't need to write code to invoke it. The FocusManager also interacts with the System Manager, which activates and deactivates FocusManager instances as pop-up windows are activated or deactivated. Each modal window has an instance of a FocusManager so the components in that window become their own tab set, preventing the user from tabbing into components in other windows.
and ....
I am using the text input component from the UI components of Flash MX Pro 2004. Should I just put that line in the first frame only ?

Thanks again for your helps.

06-20-2004, 12:51 PM
Okie, but the other words by mdchong,

Originally Posted by mdchong
I have put "focusManager.setFocus(mytextfield);" in the first frame of my fla movie. But I cannot see the blinking cursor in the textfield component.

So more clearly, my idea is for the TextField controls when the UI Component Interface has not invoked.

06-21-2004, 12:53 AM
so, we'll wait and see

third EYE
10-26-2004, 10:00 AM
anyone find a reason for the lack of blinking cursor? I have a simple swf with a username & password, both using input text components... I can set the focus, but I can't get the cursor to appear... any ideas?

Billy T
10-26-2004, 10:08 AM
tried using just a normal input text box instead of the component?

third EYE
10-26-2004, 10:27 AM
yeah I started with just a drawn input text box... neither works ;(

Billy T
10-26-2004, 10:49 AM
can you provide some info


the code

do you get a cursor if you click in the textbox?

10-26-2004, 11:55 AM
make a triangle to appear underneath the textfield and move it as the text goes wider

third EYE
10-26-2004, 08:27 PM
well there's not a ton of code... it seems like it randomly decides to show me the 'I' beam indicating an input field, and it never shows the cursor. The only thing I can think of is that I have a mouse.hide function for another part of the SWF and it uses a "this.onEnterFrame" to control it, which for some reason may be causing a conflict... that or the yamzbrowser component... it's truly bizzar as I seem to have lost all useability with dynamic and input text fields... can't highlight, no 'I" beam nothing indicating they're selectable text fields.

thanks for the help!


Billy T
10-26-2004, 09:48 PM
well try to remove the various possibilities one by one and see if the problems go away

I did have numerous problems with the yambrowser comp on various browsers...

third EYE
10-26-2004, 09:52 PM
Billy: Did you ever get yamzbrowser to work? I want to edit it pretty severely, I'm not a big fan of how they publish their component, so I thought I'd canabalise the JAVA and the call functions but toss everything else, especially the couple onEnterFrame calls they have........ any ideas/work arounds?? Something to avoid?



Billy T
10-27-2004, 12:17 AM
got it to work ok in some browsers but not all and it all also make a stange clicking sound on roll over in some browsers that I couldnt find the source of

gave up in the end and remade the sections of my project that needed a browse button using just html and php

there is alternative upload/browse flash source file floating around but I haven't tested it - try searching on google for it

third EYE
10-27-2004, 12:30 AM
there's an alternative??? I've been researching this for a few weeks and the only thing I could find was yamzbrowser (having used it all I can say is it needs another development cycle) It's a nifty fix but it doesn't play well with others, (must be the French in it, hon hon) anyway, do you remember the name of the extension or bit of code??? or where you read about it...

third EYE
10-27-2004, 12:37 AM
ok found a link... anyone interested:


thanks Billy

11-25-2004, 01:54 PM
I'm having the old focusManager issues that have been discussed here. I don't want to use any components, just input text boxes and homemade buttons.

At first, focusManager wouldn't work at all. I put a Button Component into my Library, and then it worked - BUT ONLY WHEN I OPEN THE SWF DIRECTLY FROM THE FOLDER!

It doesn't work in the test environment (Ctrl-Enter in Flash), and it doesn't work when loaded by an html window.

Why would opening the same swf have different results? This is confusing.

11-30-2004, 03:43 PM
I realize now that it does work when I open the html... it's just that the html window doesn't automatically get focus when I open it. Clicking anywhere within the window reveals that it is working. I'm still having issues with defaultPushButton though... does it only work for Component Buttons?

12-01-2004, 05:55 AM
u can do this by:
1) JS (search for it, been answered many times)
2) make an intro page so to force the user to activate the swf content in the HTML page and then the focusManager will work properly