This the known issue where the Flash Player itself does not have the focus. 

The function works correctly once the player does have the focus.

Work arounds for this usually include _javascript_ that sets focus on the player.  There is an example on CFLEX.net.

Tracy

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jason Hawryluk
Sent: Friday, May 19, 2006 10:14 AM
To: [email protected]
Subject: RE: [flexcoders] Re: setFocus() on TextInput (FB2B3)

I just tried this since the last time I saw the same results, and it works
on a popup/form with no view stack, states, or effects on the showing, but
when in a viewstack it still does not work.

I'm fairly sure its caused by a bug in the viewstack, as I tried without
effects and it still does not work.

Jason


-----Message d'origine-----
De : [email protected] [mailto:[EMAIL PROTECTED] la
part de Cristian Pop
Envoyé : vendredi 19 mai 2006 14:52
À : [email protected]
Objet : [flexcoders] Re: setFocus() on TextInput (FB2B3)


Nope, it's not working. I know I'm missing something, it should be
simple, right ?

Here is a test code ...

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
      <![CDATA[
            public function Focus():void
                  {
                        textField.setFocus();
                        textField.setSelection(0,0);
                  }
      ]]>
</mx:Script>
      <mx:Panel x="28" y="25" width="250" height="200" layout="absolute">
            <mx:TextInput x="10" y="19" focusEnabled="true" id="textField"
creationComplete="Focus();" text="test"/>
      </mx:Panel>

</mx:Application>

Cristian

--- In [email protected], "jeremy lu" <[EMAIL PROTECTED]> wrote:
>
> how about textField.setSelection(0,0) ?
>
> On 5/19/06, Cristian Pop <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > I have some problem setting the focus in a PopUp to a TextInput
control.
> > I've tried calling setFocus on the textinput both in creationComplete
> > Evnet of the Parent and alos on the input itself but the only result
> > is that the focus marker appears on on input but I cannot type
> > anything in it.
> >
> > I've also tried using FocusManaget with the same.
> >
> > Thanks,
> >
> > Cristian
> >
> >
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>







--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com



SPONSORED LINKS Web site design development Computer software development
Software design and development
Macromedia flex Software development best practice



YAHOO! GROUPS LINKS

Visit your group "flexcoders" on the web.

To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]

Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links











--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to