Over 10 years of community discussion and knowledge are maintained here as a read-only archive.
import mx.core.ComponentDescriptor; import mx.core.Container; import mx.core.UIComponent; import mx.core.UIComponentDescriptor;
I've linked to SWC's, but never tried compiling them into a Flash file. I didn't think it was possible. Reading that article it sounds overly complicated and something most aren't likely to go through just to use a swc.
Jason, what I gathered from the article was that the difficult part may be creating such a swc that works with Flash CS3. The process seemed complicated but with something like ant it's a one time thing to build. After that, the usage was 2 phased, load the library swf and use the classes with the swc on the classpath.
Btw, have you used CS4. Is there anything different with its swc implementation.
/** * @private (protected) * * @langversion 3.0 * @playerversion Flash 9.0.28.0 */ protected function createFocusManager():void { if (focusManagers[stage] == null) { focusManagers[stage] = new FocusManager(stage); } }
Looking at the FocusManager's constructor it seems to listen for Event.ADDED and Event.REMOVED. You could force it to trigger the internal removeHandler by sending a custom event with stage.dispatchEvent(new Event(Event.REMOVED). That might work but will probably have side effects to existing components. Forcibly linking the component in the parent swf is likely the best approach.peace,darshan
public function dispose():void { sendNotification(FabricationNotification.SHUTDOWN, getApplication()); startupCommand = null; if (controller is IDisposable) { (controller as IDisposable).dispose(); } if (view is IDisposable) { (view as IDisposable).dispose(); } if (model is IDisposable) { (model as IDisposable).dispose(); } singletonInstanceMap.dispose(); singletonInstanceMap = null; removeCore(multitonKey); }
public function dispose():void { sendNotification(FabricationNotification.SHUTDOWN, getApplication()); startupCommand = null; if (view is IDisposable) { (view as IDisposable).dispose(); } if (model is IDisposable) { (model as IDisposable).dispose(); } if (controller is IDisposable) { (controller as IDisposable).dispose(); } singletonInstanceMap.dispose(); singletonInstanceMap = null; removeCore(multitonKey); }
/** * Overrides executeCommand to add the command to the undoStack * if it is undoable. */ override public function executeCommand(note:INotification):void { var commandList:Array = commandMap[note.getName()]; if (commandList == null) return;
// check to make sure we have a commandMap or that the property exists to avoid errors if(!commandMap || !commandMap.hasOwnProperty(note.getName())) return; var commandList:Array = commandMap[note.getName()];