0 Replies Latest reply on Oct 14, 2007 3:19 PM by kenceng

    multiple modules

    kenceng
      how to load multiple module in ArrayCollection data Url??

      I use this. and I have many error :

      quote:

      <?xml version="1.0" encoding="utf-8"?>
      <mx:Module xmlns:mx=" http://www.adobe.com/2006/mxml" creationComplete="StartModule()" width="1024" layout="vertical">
      <mx:Script>
      <![CDATA[
      import mx.events.ModuleEvent;
      import mx.modules.*;
      import mx.controls.Alert;
      import mx.core.Application;
      import mx.modules.IModuleInfo;
      import mx.collections.ArrayCollection;
      [Bindable]public var addOnsKiriArray:ArrayCollection;
      [Bindable]public var addOnsTengahArray:ArrayCollection;
      [Bindable]public var addOnsKananArray:ArrayCollection;
      [Bindable]public var KaddOnsKiriArray:Array;
      [Bindable]public var TaddOnsKiriArray:Array;
      [Bindable]public var KNaddOnsKiriArray:Array;
      [Bindable]public var KaddOnsKiriArrayS:Array;
      [Bindable]public var TaddOnsKiriArrayS:Array;
      [Bindable]public var KNaddOnsKiriArrayS:Array;
      [Bindable]public var KaddOnsKiriArraySV:ArrayCollection;
      [Bindable]public var TaddOnsKiriArraySV:ArrayCollection;
      [Bindable]public var KNaddOnsKiriArraySV:ArrayCollection;
      public var info:IModuleInfo;
      private function StartModule():void{

      addOnsKiriArray = Application.application.addOnsPagesCollect as ArrayCollection;
      KaddOnsKiriArray = addOnsKiriArray.toArray();
      KaddOnsKiriArrayS = KaddOnsKiriArray.slice(0,3);
      KaddOnsKiriArraySV = new ArrayCollection( KaddOnsKiriArrayS );

      addOnsTengahArray = Application.application.addOnsPagesCollect as ArrayCollection;
      TaddOnsKiriArray = addOnsTengahArray.toArray();
      TaddOnsKiriArrayS = TaddOnsKiriArray.slice(3,6);
      TaddOnsKiriArraySV = new ArrayCollection( TaddOnsKiriArrayS );

      addOnsKananArray = Application.application.addOnsPagesCollect as ArrayCollection;
      KNaddOnsKiriArray = addOnsKananArray.toArray();
      KNaddOnsKiriArrayS = KNaddOnsKiriArray.slice(6, 9);
      KNaddOnsKiriArraySV = new ArrayCollection( KNaddOnsKiriArrayS );

      //addOnsKananArray = Application.application.addOnsPagesCollect;

      //Alert.show(logo,"nnn");

      }
      ]]>
      </mx:Script>

      <mx:HBox width="100%">
      <mx:SWFLoader id="logoLoad" source="{'../../'+Application.application.logo}"/>
      </mx:HBox>
      <mx:VBox width="100%" horizontalAlign="center">
      <mx:MenuBar id="menus" click="Application.application.menuxClick(menus);" itemClick="Application.application.itemClick(event);" width="100%">

      <mx:dataProvider>
      {Application.application.configure.lastResult.applicationCMS.menu.menuitem}
      </mx:dataProvider>

      </mx:MenuBar>
      <mx:HBox width="100%">
      <mx:VBox id="kiri" width="25%" verticalGap="0">
      <mx:Repeater id="kiriRepeat" dataProvider="{KaddOnsKiriArraySV}">
      <mx:ModuleLoader id="addOnsLoaderKiri" url="{kiriRepeat.currentItem.addOnsPath}"/>
      </mx:Repeater>
      </mx:VBox>
      <mx:VBox id="tengah" width="50%">
      <mx:Repeater id="tengahRepeat" dataProvider="{TaddOnsKiriArraySV}">
      <mx:ModuleLoader id="addOnsLoaderTengah" url="{tengahRepeat.currentItem.addOnsPath}"/>
      </mx:Repeater>
      </mx:VBox>
      <mx:VBox id="kanan" width="25%">
      <mx:Repeater id="kananRepeat" dataProvider="{KNaddOnsKiriArraySV}">
      <mx:ModuleLoader id="addOnsLoaderKanan" url="{kananRepeat.currentItem.addOnsPath}"/>
      </mx:Repeater>
      </mx:VBox>
      </mx:HBox>
      <mx:Label text="{Application.application.copyrigth}"/>

      </mx:VBox>
      </mx:Module>



      Please help me......