I found a different solution through trial and error after looking at
the IFocus* classes.  I'm cautiously optimistic that I have this
working...

I had to roll my own FocusManager and replace the Application's
FocusManager with my own and activate it. I also had to roll my own
UIMovieClip classe and set my UIMovieClip as the base class for all
MovieClips in the Flash SWF with a bit of JSFL -- this much I can make
the Designers do (use a command when they publish). 

I basically altered FocusManager.addFocusables so that I could add
MC's manually and ensure that the UIMovieClips could receive focus,
and altered the UIMovieClip subclass to add the MC to it's own list of
focusableObjects list. 

Now the SWFLoader adds the MC's in the SWF to the main application's
FocusManager's list of items to tab through on load, and removes them
on unload. 

This was a major PITA, but the focus appears to be working correctly
now. Thanks for the point in the right direction! I seriously owe you one!

Jer

--- In flexcoders@yahoogroups.com, Alex Harui <aha...@...> wrote:
>
> No examples of your situation, but DataGrid uses keyFocusChange and
my blog's DG editor with two editable fields post also shows how to
grab keyFocusChange and basically shutdown Flex's focus handling so
you can run your own.
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com]
On Behalf Of aut0poietic
> Sent: Tuesday, December 09, 2008 5:23 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Cannot Tab to MovieClips from Flash SWF
Loaded with SWFLoader
> 
> 
> My designers build the content, but it's rapid dev by non-technicals.
> I can do limited content prep, if I can automate it for them.
> 
> I'll look into using implementing a SWFLoader that implements
> IFocusManagerComponent. Difficulty isn't that big of a concern -- it's
> either make this work or dump a months worth of work.
> 
> Been googling for examples of this technique to see if it'll do what I
> need. You know of any existing implementations or articles on the topic?
> 
> IT really seems like I can get either the flex content tab order
> working, or the loaded swf content working, but not both.
> 
> Thanks for the help so far.
> 
> --- In
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, Alex
Harui <aharui@> wrote:
> >
> > If you don't own the content, the FCK won't help you. You'll need
> to wrap the content and implement your own tabbing scheme. Difficulty
> Rating 8 out of 10.
> >
> > You'd need a SWFLoader subclass that implements
> IFocusManagerComponent. It would need a keyFocusChange handler that
> calls preventDefault().
> >
> > From:
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
[mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>]
> On Behalf Of aut0poietic
> > Sent: Tuesday, December 09, 2008 1:34 PM
> > To: flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>
> > Subject: [flexcoders] Re: Cannot Tab to MovieClips from Flash SWF
> Loaded with SWFLoader
> >
> >
> > Thanks for the tip Alex. I'm googling now, but I'm curious how this
> > could be of benefit to me for a MovieClip on stage.
> >
> > Content designers build the SWF's that my application loads in, which
> > consists of simple MovieClips, images, vector graphics and some
> > interactions (like drag/drops or a multiple choice question).
> >
> > It sounds like I'd have to specify a base class for every movieclip on
> > stage that implemented IFocusManagerComponent.
> >
> > Am I far off, or is there some secret sauce in the kit?
> >
> > --- In
>
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>,
Alex
> Harui <aharui@> wrote:
> > >
> > > The CS3 entities need to implement IFocusManagerComponent. You
> > might be able to use the Flash Component Kit to do that
> > >
> > > From:
>
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
>
[mailto:flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>]
> > On Behalf Of aut0poietic
> > > Sent: Tuesday, December 09, 2008 7:47 AM
> > > To:
flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com><mailto:flexcoders%40yahoogroups.com>
> > > Subject: [flexcoders] Cannot Tab to MovieClips from Flash SWF Loaded
> > with SWFLoader
> > >
> > >
> > > Title pretty much says it all:
> > >
> > > I have a Flex 3 application which can basically be summed up as
a SWF
> > > player which loads SWF's created in Flash CS3.
> > >
> > > When the SWF's are loaded, I can interact with them using the mouse
> > > (click/mouseover, etc). However, these items cannot be tabbed to.
> > >
> > > I've been hacking around on this all morning, without much luck.
I've
> > > ensured that every item in the application either has a tabIndex and
> > > is .tabEnabled or has tabEnabled=false and tabChildren=true.
> > >
> > > I've even resorted to enumerating over the child MovieClips in
the swf
> > > (using swfLoaderInstance.content.getChildAt()) and setting
tabEnabled
> > > and focusRect are both true, and confirming that the tabIndex on
these
> > > mc's was preserved.
> > >
> > > I'm at a serious loss as to what to do next -- I can't have
> > > controls/interactions that the user can't tab to. Am I missing
> > > something simple? A setting on the SWFLoader? The Application?
> > >
> > > Hope someone's had to deal with this before and knows a solution.
> > >
> > > Jer
> > >
> >
>


Reply via email to