1 Reply Latest reply on Jun 5, 2006 2:57 PM by Newsgroup_User

    can not setfocus() on creationcomplete

    blomasky Level 1
      It seems to work (the text control has a blue border), but I can NOT type in the field. I have to click with the mouse to have it really gain focus. Any suggestions?

      thanks
      bruce
        • 1. Re: can not setfocus() on creationcomplete
          Level 7
          Hi blomasky,
          > It seems to work (the text control has a blue border), but I can NOT type in the field. I have to click with the mouse to have it really gain focus. Any suggestions?

          Is this an issue with setting focus from your main application's
          creationComplete handler? If so, the problem is probably that the
          browser doesn't actually set keyboard focus to the Flash plugin when you
          first load the page--you have to click on the application first in order
          to give it focus.

          You can try fixing this by editing the HTML file that includes the Flash
          plugin, by adding a line to the JavaScript that instantiates the plugin
          to call focus() on the plugin object after it's created. (If you're
          using Flex Builder, you should do this in the HTML template in the
          html-wrapper folder; this template is used to generate the output HTML
          files in the bin folder.) This will probably work in IE, but doesn't
          appear to work in Firefox; hopefully this will be resolved in a future
          version of Firefox.

          Hope this helps.

          --
          nj
          Flex Builder team