xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
import mx.events.ModuleEvent;
import mx.modules.*;
import mx.controls.Alert;
private function errorHandler(e:ModuleEvent):void {
Alert.show("There was an error loading the module." + " Please contact the Help Desk.");
trace(e.errorText);
}
public function createModule():void {
if (chartModuleLoader.url == ti1.text) {
/* If they are the same, call loadModule. */
chartModuleLoader.loadModule();
} else {
/* If they are not the same, then change the url,
which triggers a call to the loadModule() method. */
chartModuleLoader.url = "assets/" + ti1.text;
}
}
public function removeModule():void {
chartModuleLoader.unloadModule();
}
paddingLeft="10" paddingRight="10" paddingBottom="10">