[flexcoders] Re: Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader
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.commailto: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.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aut0poietic Sent: Tuesday, December 09, 2008 1:34 PM To: flexcoders@yahoogroups.commailto: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.commailto:flexcoders%40yahoogroups.commailto: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.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aut0poietic Sent: Tuesday, December 09, 2008 7:47 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto: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
[flexcoders] Re: Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader
Repost: Sent similar reply yesterday, but it didn't make it here for some reason. Alex, serious thanks for your help. I got the problem solved a different way, but you pointing me at the IFocus* classes provided it. Basically, I rolled my own FocusManager to be a sort of Hybrid -- it functions normally most of the time, but it's addFocusables() method was altered to be public and to have specific methodology for handling UIMovieClip classes originating in an SWFLoader. In the main MXML file I removed and deactivated the default FocusManager from the application and the systemmanager, Inserted mine in both places, and activated it. I also had to roll my own UIMovieClip class and downloaded the source to the Flex Component Kit classes to do it. I then wrote a bit of JSFL that adds my custom UIMovieClip class as the Base Class for all MC's in the Library. I also subclassed the SWFLoader to pull MovieClips from the loaded SWF (based on their AccessibilityProperties) and add them to my FocusManager on onLoad, and remove them onUnload. So far so good. It's going to take a ton of tweaking to get the Flash to behave similarly to the Flex controls -- and I haven't even partially addressed the accessibility yet. Thanks for the point in the right direction!
[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, Alex Harui [EMAIL PROTECTED] 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:[EMAIL PROTECTED] On Behalf Of aut0poietic Sent: Tuesday, December 09, 2008 1:34 PM To: flexcoders@yahoogroups.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.commailto: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.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of aut0poietic Sent: Tuesday, December 09, 2008 7:47 AM To: flexcoders@yahoogroups.commailto: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
[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
[flexcoders] Re: How to make Flex exchange data with Flash SWF file?
--- In flexcoders@yahoogroups.com, markflex2007 [EMAIL PROTECTED] wrote: Please give me a general idea or some urls. Thanks a lot Mark Doing this now: If you're using a Flash 9/10 file in Flex 3 and in the same domain, you can load the SWF into a SWFLoader control, and once loaded, the SWF is in the .content property of the SWFLoader. So say you wanted to call the setMyText(text) method of your swf, once the swf is loaded, you can simply call MovieClip(swfLoaderInstance.content).setMyText(hello from Flex) ; Google livedocs for SWFLoader for more information.
[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, Alex Harui [EMAIL PROTECTED] 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:[EMAIL PROTECTED] On Behalf Of aut0poietic Sent: Tuesday, December 09, 2008 7:47 AM To: flexcoders@yahoogroups.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