Strange indeed :) I know the code I pointed you to used a canvas, I just wanted to see if that made a difference. Maybe try converting that file to use the global instance and see if that works?
Ben --- In flexcoders@yahoogroups.com, "valdhor" <[EMAIL PROTECTED]> wrote: > > Well, color me totally confused. I have no idea what I did but now it > works (Although I still do not see any focus events; But I don't need > those right now). > > Here is the pared down code which works... > > <?xml version="1.0" encoding="utf-8"?> > <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" > layout="absolute" creationComplete="init()"> > <mx:Script> > <![CDATA[ > import flexmdi.events.MDIManagerEvent; > import flexmdi.managers.MDIManager; > import flexmdi.containers.MDIWindow; > > private function init():void > { > var win1:MDIWindow = new MDIWindow(); > win1.width = win1.height = 300; > win1.title = "Window One"; > var win2:MDIWindow = new MDIWindow(); > win2.width = win2.height = 300; > win2.title = "Window Two"; > > MDIManager.global.add(win1); > MDIManager.global.add(win2); > > > MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_START, > windowEventHandler); > > MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_FOCUS_END, > windowEventHandler); > > MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_START, > windowEventHandler); > > MDIManager.global.addEventListener(MDIManagerEvent.WINDOW_DRAG_END, > windowEventHandler); > } > > private function windowEventHandler(event:Event):void > { > if(event is MDIManagerEvent) > { > var mgrEvent:MDIManagerEvent = event as > MDIManagerEvent; > trace(mgrEvent.window.title + " > MDIManagerEvent: " + event.type); > } > } > ]]> > </mx:Script> > </mx:Application> > > > If I move both of the windows, this is what is output... > > Window Two MDIManagerEvent: windowDragStart > Window Two MDIManagerEvent: windowDragEnd > Window One MDIManagerEvent: windowDragStart > Window One MDIManagerEvent: windowDragEnd >