xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx">
import mx.events.ModuleEvent;
import flash.events.ProgressEvent;
import mx.modules.*;
[Bindable]
public var progBar:String = "";
[Bindable]
public var progMessage:String = "";
private function progressEventHandler(e:ProgressEvent):void {
progBar += ".";
progMessage = "Module " + Math.round((e.bytesLoaded/e.bytesTotal) * 100) + "% loaded";
}
public function initApp():void {
chartModuleLoader.url = "assets/ColumnChartModule.swf";
}
public function createModule():void {
chartModuleLoader.loadModule();
}
public function removeModule():void {
chartModuleLoader.unloadModule();
progBar = "";
progMessage = "";
}
paddingLeft="10" paddingRight="10" paddingBottom="10">
progress="progressEventHandler(event)" />