home *** CD-ROM | disk | FTP | other *** search
/ Computer Active 2010 August / CA08.iso / Multimedija / shufflr.air / ShufflrClient.swf / scripts / com / althea / client / shufflr / controller / GetDataCommand.as < prev    next >
Encoding:
Text File  |  2010-06-23  |  2.0 KB  |  63 lines

  1. package com.althea.client.shufflr.controller
  2. {
  3.    import com.althea.client.shufflr.*;
  4.    import com.althea.client.shufflr.model.*;
  5.    import mx.collections.ArrayCollection;
  6.    import org.puremvc.as3.multicore.interfaces.*;
  7.    import org.puremvc.as3.multicore.patterns.command.*;
  8.    import org.puremvc.as3.multicore.patterns.observer.*;
  9.    
  10.    public class GetDataCommand extends SimpleCommand
  11.    {
  12.       public function GetDataCommand()
  13.       {
  14.          super();
  15.       }
  16.       
  17.       override public function execute(param1:INotification) : void
  18.       {
  19.          var _loc4_:String = null;
  20.          var _loc5_:ArrayCollection = null;
  21.          var _loc6_:String = null;
  22.          var _loc7_:ShuffleFeedProxy = null;
  23.          var _loc2_:Object = Object(param1.getBody());
  24.          if(_loc2_.view != null && _loc2_.view != "homeView")
  25.          {
  26.             sendNotification(ApplicationFacade.CHANGE_MODE,_loc2_.view,_loc2_.dataType);
  27.             sendNotification(ApplicationFacade.SHOW_PRELOADER);
  28.          }
  29.          if(_loc2_.name == "myzone")
  30.          {
  31.             sendNotification(ApplicationFacade.LOAD_MYZONE);
  32.             return;
  33.          }
  34.          var _loc3_:NavMapProxy = facade.retrieveProxy(NavMapProxy.NAME) as NavMapProxy;
  35.          if(Boolean(_loc2_.link) && _loc2_.link != "")
  36.          {
  37.             _loc4_ = _loc2_.link;
  38.          }
  39.          else if(_loc2_.notification)
  40.          {
  41.             sendNotification(_loc2_.notification);
  42.             return;
  43.          }
  44.          if(_loc4_ == null || _loc4_ == "")
  45.          {
  46.             return;
  47.          }
  48.          if(_loc4_.indexOf("navmap") == 0)
  49.          {
  50.             _loc5_ = _loc3_.loadMenuData(_loc4_);
  51.             _loc6_ = _loc2_.dataType;
  52.             sendNotification(_loc6_,_loc5_);
  53.          }
  54.          else
  55.          {
  56.             _loc7_ = facade.retrieveProxy(ShuffleFeedProxy.NAME) as ShuffleFeedProxy;
  57.             _loc7_.loadData(_loc2_,_loc2_.dataType);
  58.          }
  59.       }
  60.    }
  61. }
  62.  
  63.