16 Replies Latest reply: May 14, 2014 11:09 PM by Flex harUI RSS

    Module shrink issue

    jfb00 Community Member

      Hi All,

      My app have a menu, each option of the menu call a module as:

       

      public function itemClickHandler(event:MenuEvent):void{

           switch(event.label){

                          case "MenuA":

                              loadModule("ModuleA.swf");

                              break;

                          default:

                              break;

                      }

      }

       

      public function loadModule(moduleName:String):void{

                 myModule.unloadModule();

                          myModule.url= moduleName+'?_ts='+fileTimestamp;

                          myModule.loadModule();

      }

       

      <s:ModuleLoader id="myModule" width="100%" height="100%" url="Home.swf?_ts=" unload="chkDirty()" />

       

      This particular Module shrink. Other modules doesn't have this issue.

      The module Shrink more every time finish the remote call of data from a loop.

      Here is my module:

       

      <?xml version="1.0" encoding="utf-8"?>

      <s:Module xmlns:fx="http://ns.adobe.com/mxml/2009"

                xmlns:s="library://ns.adobe.com/flex/spark"

                xmlns:mx="library://ns.adobe.com/flex/mx"

                creationComplete="init()"

                width="100%" height="100%">

          <fx:Script>

              <![CDATA[

       

      public function init():void{

                      //load styles

                      this.styleManager.loadStyleDeclarations("styles/styles.swf",true);

      }

       

      private function refreshData():void{

                      arrayLength ++;

                      if (arrayLength < 4){

                          SM_RO.getData();

                     }else{

                          //pass data to datagrid

      //I try this without luck:

      this.percentHeight = 100;

      this.percentWidth = 100;

                     }

      }

       

      private function getData_Handler(event:ResultEvent):void{

      //....

           refreshData();

      }

          ]]>

          </fx:Script>

       

      <fx:Declarations>

              <mx:RemoteObject id="SM_RO" destination="ColdFusion" source="{cfcPath}" concurrency="multiple" >

                  <mx:method name="getData" result="getData_Handler(event)" fault="FlexGlobals.topLevelApplication.error_Handler(event)" concurrency="multiple" />

            </mx:RemoteObject>

      </fx:Declarations>

       

      <mx:Panel width="100%" height="100%" title="{winTitle}" >

              <mx:ComboBox id="rmc_cb" rowCount="15" visible="false" ></mx:ComboBox>

              <grids:ExtendedAdvancedDataGrid ...

       

      </mx:Panel>

      </s:Module>

       

      I am using FB 4.7 with SDK 4.11. Does anyone have the same issue? Is anything like this reported before?

      Any ideas?

      Thanks!