3 Replies Latest reply on May 13, 2010 9:00 PM by Flex harUI

    Loading sub-application into child domain

    ilya_k

      Are there any limitation on how many sub-apps can be loaded into child domain?  It seems that we hit the limit of about 32 or so.

      Attempt to load more causes browser crash (actually it depends on browser it might hang or crash or report that Shockwave Flash crashes,

      but outcome same - Web client becomes unusable).  Do we have to do something special to workaround such restriction?

       

      We built app in Flex 3.0.2 and load sub-application using SWFLoader  as follows:

       

       

              private static function loadSwf(perspectiveView:PerspectiveView):void

              {

                  var swfLoader:SWFLoader = new SWFLoader();

                  swfLoader.showBusyCursor = true;

                  swfLoader.trustContent = true;

                  swfLoader.scaleContent = true;

                  swfLoader.percentHeight = 100;

                  swfLoader.percentWidth = 100;

                  startLoad = getTimer();

                  swfLoader.addEventListener(SWFLoadCompleteEvent.LOAD_COMPLETE, loadCompleteHandler);

       

                  swfLoader.source = perspectiveView.viewInstanceVO.viewDefinitionVO.asset.serverUri;

              }

       

              private static function loadCompleteHandler(event:SWFLoadCompleteEvent):void

              {

                  ...

       

                  perspectiveView.addChild(swfLoader);

       

              }

          }

       

       

       

      Where PerspectiveView is the subclass of TitleWindow and

      perspectiveView.viewInstanceVO.viewDefinitionVO.asset.serverUri points at sub-app SWF URI

       

      Thank you,

      _Ilya