[Flashcoders] FocusManager

2010-05-04 Thread Elia Morlin
I needed to know which object was in Focus, so I imported the FocusManager
from the fl.managers package which is not included in AS projects in Flex.

The whole library is rather bloated, and contains loads of warnings.

Is there some other FocusManager I should be using for an AS3 project in
Flex?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FocusManager

2007-08-21 Thread Bart Wttewaall
Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] FocusManager

2010-05-13 Thread Elia Morlin
I needed to know which object was in Focus, so I imported the FocusManager
from the fl.managers package which is not included in AS projects in Flex.

The whole library is rather bloated, and contains loads of warnings.

Is there some other FocusManager I should be using for an AS3 project in
Flex?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FocusManager

2007-08-21 Thread John laPlante

Are you using calling this relative to _root or _level0?
_root.focusManager.setFocus

Bart Wttewaall wrote:

Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FocusManager

2007-08-21 Thread Bart Wttewaall
Thanks for replying John,

But no, I never use _root, nor _level.
I'm calling this from a clickHandler within my component's class.
Like this (pseudocode):

class Joystick extends UIComponent {

...

public function init() {
...
tabEnabled = true;
tabChildren = false;
...
}

private function onRelease() {
getFocusManager().setFocus(this);
}

}

2007/8/21, John laPlante <[EMAIL PROTECTED]>:
> Are you using calling this relative to _root or _level0?
> _root.focusManager.setFocus
>
> Bart Wttewaall wrote:
> > Hi list,
> >
> > I'm having trouble with the focusmanager. I created a Joystick
> > component that should be able to receive focus using the tab-key
> > (tabIndex) or by clicking it.
> >
> > Since it extends UIComponent, implementing the tabIndex version is
> > easy; at init, set tabEnabled to true and tabChildren to false.
> >
> > Now when the user clicks the component, it should also receive focus.
> > I've tried to call setFocus(this) or getFocusManager().setFocus(), but
> > the result is no focus, and worse, the joystick element with which you
> > control the component stops functioning as if the mouse is ignored.
> >
> > Does anyone have an example or a good source about the FocusManager?
> > Thanks in advance.
> >
> > Bart Wttewaall
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FocusManager

2007-08-21 Thread John laPlante

Go ahead and try that and I bet it will work.

Bart Wttewaall wrote:

Thanks for replying John,

But no, I never use _root, nor _level.
I'm calling this from a clickHandler within my component's class.
Like this (pseudocode):

class Joystick extends UIComponent {

...

public function init() {
...
tabEnabled = true;
tabChildren = false;
...
}

private function onRelease() {
getFocusManager().setFocus(this);
}

}

2007/8/21, John laPlante <[EMAIL PROTECTED]>:
  

Are you using calling this relative to _root or _level0?
_root.focusManager.setFocus

Bart Wttewaall wrote:


Hi list,

I'm having trouble with the focusmanager. I created a Joystick
component that should be able to receive focus using the tab-key
(tabIndex) or by clicking it.

Since it extends UIComponent, implementing the tabIndex version is
easy; at init, set tabEnabled to true and tabChildren to false.

Now when the user clicks the component, it should also receive focus.
I've tried to call setFocus(this) or getFocusManager().setFocus(), but
the result is no focus, and worse, the joystick element with which you
control the component stops functioning as if the mouse is ignored.

Does anyone have an example or a good source about the FocusManager?
Thanks in advance.

Bart Wttewaall
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

  

___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FocusManager

2007-08-22 Thread Bart Wttewaall
Well, I'd be truly surprised if that would work, but I'l try tomorrow
when I'm at work again :)
Thanks for the tip.

Bart

2007/8/21, John laPlante <[EMAIL PROTECTED]>:
> Go ahead and try that and I bet it will work.
>
> Bart Wttewaall wrote:
> > Thanks for replying John,
> >
> > But no, I never use _root, nor _level.
> > I'm calling this from a clickHandler within my component's class.
> > Like this (pseudocode):
> >
> > class Joystick extends UIComponent {
> >
> > ...
> >
> > public function init() {
> > ...
> > tabEnabled = true;
> > tabChildren = false;
> > ...
> > }
> >
> > private function onRelease() {
> > getFocusManager().setFocus(this);
> > }
> >
> > }
> >
> > 2007/8/21, John laPlante <[EMAIL PROTECTED]>:
> >
> >> Are you using calling this relative to _root or _level0?
> >> _root.focusManager.setFocus
> >>
> >> Bart Wttewaall wrote:
> >>
> >>> Hi list,
> >>>
> >>> I'm having trouble with the focusmanager. I created a Joystick
> >>> component that should be able to receive focus using the tab-key
> >>> (tabIndex) or by clicking it.
> >>>
> >>> Since it extends UIComponent, implementing the tabIndex version is
> >>> easy; at init, set tabEnabled to true and tabChildren to false.
> >>>
> >>> Now when the user clicks the component, it should also receive focus.
> >>> I've tried to call setFocus(this) or getFocusManager().setFocus(), but
> >>> the result is no focus, and worse, the joystick element with which you
> >>> control the component stops functioning as if the mouse is ignored.
> >>>
> >>> Does anyone have an example or a good source about the FocusManager?
> >>> Thanks in advance.
> >>>
> >>> Bart Wttewaall
> >>> ___
> >>> Flashcoders@chattyfig.figleaf.com
> >>> To change your subscription options or search the archive:
> >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>>
> >>> Brought to you by Fig Leaf Software
> >>> Premier Authorized Adobe Consulting and Training
> >>> http://www.figleaf.com
> >>> http://training.figleaf.com
> >>>
> >>>
> >>>
> >> ___
> >> Flashcoders@chattyfig.figleaf.com
> >> To change your subscription options or search the archive:
> >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >>
> >> Brought to you by Fig Leaf Software
> >> Premier Authorized Adobe Consulting and Training
> >> http://www.figleaf.com
> >> http://training.figleaf.com
> >>
> >>
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
> >
> ___
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] FocusManager

2007-08-24 Thread Bart Wttewaall
I finally figured it out!

When you press on an element in a component you don't call setFocus,
but pressFocus() instead! And don't forget the releaseFocus() as well.
This sets a fake focus on component and a true focus on the element so
that you're still able to interact with the element.

Man that was a tough problem with almost no information about it anywhere.
If anyone is looking for more info on the subject, see UIComponent's methods:

. setFocus()
. getFocus()
. pressFocus()
. releaseFocus()
. onSetFocus(oldFocus)
. onKillFocus(newFocus)

2007/8/22, Bart Wttewaall <[EMAIL PROTECTED]>:
> Well, I'd be truly surprised if that would work, but I'l try tomorrow
> when I'm at work again :)
> Thanks for the tip.
>
> Bart
>
> 2007/8/21, John laPlante <[EMAIL PROTECTED]>:
> > Go ahead and try that and I bet it will work.
> >
> > Bart Wttewaall wrote:
> > > Thanks for replying John,
> > >
> > > But no, I never use _root, nor _level.
> > > I'm calling this from a clickHandler within my component's class.
> > > Like this (pseudocode):
> > >
> > > class Joystick extends UIComponent {
> > >
> > > ...
> > >
> > > public function init() {
> > > ...
> > > tabEnabled = true;
> > > tabChildren = false;
> > > ...
> > > }
> > >
> > > private function onRelease() {
> > > getFocusManager().setFocus(this);
> > > }
> > >
> > > }
> > >
> > > 2007/8/21, John laPlante <[EMAIL PROTECTED]>:
> > >
> > >> Are you using calling this relative to _root or _level0?
> > >> _root.focusManager.setFocus
> > >>
> > >> Bart Wttewaall wrote:
> > >>
> > >>> Hi list,
> > >>>
> > >>> I'm having trouble with the focusmanager. I created a Joystick
> > >>> component that should be able to receive focus using the tab-key
> > >>> (tabIndex) or by clicking it.
> > >>>
> > >>> Since it extends UIComponent, implementing the tabIndex version is
> > >>> easy; at init, set tabEnabled to true and tabChildren to false.
> > >>>
> > >>> Now when the user clicks the component, it should also receive focus.
> > >>> I've tried to call setFocus(this) or getFocusManager().setFocus(), but
> > >>> the result is no focus, and worse, the joystick element with which you
> > >>> control the component stops functioning as if the mouse is ignored.
> > >>>
> > >>> Does anyone have an example or a good source about the FocusManager?
> > >>> Thanks in advance.
> > >>>
> > >>> Bart Wttewaall
> > >>> ___
> > >>> Flashcoders@chattyfig.figleaf.com
> > >>> To change your subscription options or search the archive:
> > >>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>>
> > >>> Brought to you by Fig Leaf Software
> > >>> Premier Authorized Adobe Consulting and Training
> > >>> http://www.figleaf.com
> > >>> http://training.figleaf.com
> > >>>
> > >>>
> > >>>
> > >> ___
> > >> Flashcoders@chattyfig.figleaf.com
> > >> To change your subscription options or search the archive:
> > >> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >>
> > >> Brought to you by Fig Leaf Software
> > >> Premier Authorized Adobe Consulting and Training
> > >> http://www.figleaf.com
> > >> http://training.figleaf.com
> > >>
> > >>
> > > ___
> > > Flashcoders@chattyfig.figleaf.com
> > > To change your subscription options or search the archive:
> > > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> > >
> > > Brought to you by Fig Leaf Software
> > > Premier Authorized Adobe Consulting and Training
> > > http://www.figleaf.com
> > > http://training.figleaf.com
> > >
> > >
> > ___
> > Flashcoders@chattyfig.figleaf.com
> > To change your subscription options or search the archive:
> > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
> >
> > Brought to you by Fig Leaf Software
> > Premier Authorized Adobe Consulting and Training
> > http://www.figleaf.com
> > http://training.figleaf.com
> >
>
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


[Flashcoders] FocusManager in External SWF

2008-10-29 Thread Daniel Boey
Hi people,

I was able to get FocusManager to work properly in let's call it, SWF B.
But when I load SWF B into SWF A, I get an error,

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at fl.managers::FocusManager/activate()
at fl.managers::FocusManager()
at class::SWF_A()

This is baffling me, apparently it's dying out at the constructor of SWF B
itself right after I instantiate with

focusManager:FocusManager = new FocusManager(this);

Works just splendid in SWF B on its own, allowing me to go to
NextFocusManagerComponent and all. I don't get it, can anybody shed some
light on this?

-- 
Thanks & Best regards,
Daniel Boey
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FocusManager in External SWF

2008-10-29 Thread Daniel Boey
Hey people,

Light please?

-- Forwarded message --
From: Daniel Boey <[EMAIL PROTECTED]>
Date: Wed, Oct 29, 2008 at 11:30 PM
Subject: FocusManager in External SWF
To: flashcoders@chattyfig.figleaf.com


Hi people,

I was able to get FocusManager to work properly in let's call it, SWF B.
But when I load SWF B into SWF A, I get an error,

TypeError: Error #1009: Cannot access a property or method of a null object
reference.
at fl.managers::FocusManager/activate()
at fl.managers::FocusManager()
at class::SWF_A()

This is baffling me, apparently it's dying out at the constructor of SWF B
itself right after I instantiate with

focusManager:FocusManager = new FocusManager(this);

Works just splendid in SWF B on its own, allowing me to go to
NextFocusManagerComponent and all. I don't get it, can anybody shed some
light on this?

-- 
Thanks & Best regards,
Daniel Boey
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FocusManager in External SWF

2008-10-30 Thread Ian Thomas
Never encountered it; but try compiling a reference to FocusManager
into swf A. This sometimes solves that sort of odd problem with Adobe
code.

i.e. in SWF A, something like:

import fl.managers.FocusManager;

:
// in class def

private static var _dummy:FocusManager;

On Thu, Oct 30, 2008 at 4:19 AM, Daniel Boey <[EMAIL PROTECTED]> wrote:
> Light please?

Oh - and just because people aren't responding doesn't mean they're
ignoring you. They might just not know the answer. :-)

HTH,
   Ian
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders