import mx.events.ModuleEvent;
import mx.modules.*;
import mx.controls.Alert;
private function errorHandler(e:ModuleEvent):void {
Alert.show("error loading."+ e.errorText);
}
public function createModule():void {
chartModuleLoader.url = "a.swf";
chartModuleLoader.loadModule();
}
public function removeModule():void {
chartModuleLoader.unloadModule();
}