Flash FocusManager Compatibility Problem
Sunday August 19, 2007
FocusManager in Flash is a class that is used to maintain focus on interactive components. Any UIComponent you can “tab” to in a Flash movie, is kept track of by the FocusManager. When you interact with the component, focus is maintained by this class.
I’ve recently been working on a project which concerns integration of Flash 8 / Flash 9 VMs (a more backward compatible equivalent to SlideRocket).
After slaving and beating at this for a few days, my attention was drawn to a comment on the LiveDocs.
So, Flash 8 (AS2) and all previous versions to CS3 (AS3) have a slightly different FocusManager implementation. The one in Flash 9 is of course implemented in the sheen and shiny AS3 VM, not the rusty scrap shavings of it’s former castaway, AS2 (confined to it’s own little box in Flash player).
If you attempt to embed a Flash 8 SWF into a Flash 9 file, and include in the Flash 8 SWF components that can obtain focus, you get some weird results after interacting with that embedded SWF.
I drew up an example for the brainy folks logging on to Adobe’s public JIRA. The bug entry can be found here.
In summary, click the button to begin interaction with the Flash 8 SWF on the left, then click the Flex combo box on the other side. The Focus Manager gets “thieved” by Flash 8 and won’t return to Flash 9. This affects a lot of other components, so much so that a comprehensive list would be inadequate.
After a few weeks of escalation and ever-stagnating progress, the bug was consigned to the “cannot fix” selection box of backward-incompatible issues that have arisen from the crevice between the thighs of Flash player, wearing different VM’s on each foot.
Sadly, one of these shoes keeps tripping up the other, and in this case, the problem is insoluble. Upgrade to Flash 9 if you want to have unilaterally compatible Flash content.
As mentioned in the LiveDocs comment, turning off the FocusManager entirely in Flash 8 smooths this over a little bit, but breaks other stuff in it’s wake.
2 Responses to "Flash FocusManager Compatibility Problem"
Dec 3, 05:16 PM
Hello there,
Sorry if I write here after months but I’ve begun to learn AS3 in these last weeks.
I have the same problem as you and I wonder if it is possibile to kill the “FocousManager clip” also in AS3.
In AS2 I can kill it by typing:
_root.createEmptyMovieClip(“killFocusManager”, focusManager.getDepth());
Do you know if and how can I “kill” it in AS3?
I think it will solve the problem.
Thanks
Dec 4, 03:54 PM
Hey,
In AS3 there’s no equivalent to the _root variable. I don’t think there’s any merit to disabling the FocusManager in AS3 (if that’s what you’re trying to do), as the consequence would be a lot of broken components :(
The FocusManager class is entirely re-written in AS3, so there’s two competing versions of the class running in the same player when you instantiate both AS2 and AS3 SWFs. Since this leads deep into the Flash Player architecture it becomes more awkward to tackle.
The way we found to kill the FocusManager in AS2 was just to declare _root.focusManager.enabled = false as described here.
From what I recall (it’s been a couple of months since we stopped working on this problem), there was no easy solution to resolve the two interfering with each other, you just have to take your AS2 SWFs and re-save them in CS3 for Flash 9 compatibility.
Knowing a little more about the context of your problem would help… how is the FocusManager problem affecting your situation?