5 Replies Latest reply on May 30, 2007 6:50 AM by kglad

    Focus problems


      I've spent a long time trying to discover what was causing a weird problem which involves some clicks in buttons being ignored. After make some tests I came across Compiled Clip components. If I remove them from the library the focus works as I would expect. The problem is I don't want (and don't have time to) to create or find replacements for all the Compiled clips I have been using in this project.

      Does anyone know how to overcome that problem without removing these components?

      I've created a simple example to show you guys the problem we are facing here.

      If you compile the code and run the application (Both slider.fla and problemCompiledClip.fla), then click into the textField (to set the focus on it) you will see the focus remains in the textField component when you click the buttons. I don't want this behaviour, I would like the focus into the buttons... invisible.

      Now, if you go to the library (on problemCompiledClip.fla) and remove the ProgressBar component, which is not even being used, the behaviour you will get is the one I would like to achieve. That's mean, even if the focus is in the textField and then you click in any button, the focus disappears from the textField. That's make ALL the clicks events in the buttons being captured.

      If I wasn't clear about the problem, let me know.

      Thanks very much

      source code is here: http://www.actionscript.org/forums/showthread.php3?p=614213#post614213
        • 1. Re: Focus problems
          kglad Adobe Community Professional & MVP
          check for a focus manager component.
          • 2. Re: Focus problems
            jfbaro_uk Level 1
            Thanks kglad,

            But unfortunately I wasn't able to make it work.

            Maybe I am doing something wrong. I tried to follow the instruction in the help.

            Any other tip?

            • 3. Re: Focus problems
              kglad Adobe Community Professional & MVP
              i don't use components so i'm unable to give you detailed help. but i do know that this problem has been discussed in this forum and, i believe, using the focus manager component led to a resolution of the problem.

              try searching this forum for something like focus problems. most people that encounter this problem don't realize it's a component issue and so components are not mentioned in their thread topic or subtopic.
              • 4. Re: Focus problems
                jfbaro_uk Level 1
                Thanks again kglad.

                I found a solution in the forum which involves using

                _root.focusManager.enabled = false;

                when loading the INNER swf.

                I'll have to test it more deeply (as the application is HUGE) to be sure it doesn't break anything else (Unit tests would be great for UI...lol).

                Through a quick test in the hot spots it's worked fine with no side effects.

                Hopefully this will help other people as well.

                • 5. Re: Focus problems
                  kglad Adobe Community Professional & MVP
                  you're welcome.