home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2011 May / ME_2011_05.iso / Galileo-Video-Tutorial / system / player.swf / scripts / controller / ParseTrainerInfoCommand.as < prev    next >
Encoding:
Text File  |  2010-11-30  |  1011 b   |  32 lines

  1. package controller
  2. {
  3.    import com.je.data.parser.IParser;
  4.    import com.je.events.UpdateEvent;
  5.    import com.je.model.Assets;
  6.    import com.je.model.vo.TrainerInfo;
  7.    import data.parser.TrainerInfoParser;
  8.    import org.robotlegs.mvcs.Command;
  9.    
  10.    public class ParseTrainerInfoCommand extends Command
  11.    {
  12.       [Inject]
  13.       public var assets:Assets;
  14.       
  15.       public function ParseTrainerInfoCommand()
  16.       {
  17.          super();
  18.       }
  19.       
  20.       override public function execute() : void
  21.       {
  22.          var _loc1_:XMLList = new XMLList(this.assets.getAssetByLinkedID("windowInfosXml"))..trainerVideo;
  23.          var _loc2_:XMLList = new XMLList(this.assets.getAssetByLinkedID("windowInfosXml"))..trainerImage;
  24.          var _loc3_:IParser = new TrainerInfoParser();
  25.          var _loc4_:TrainerInfo = TrainerInfo(_loc3_.parse(_loc1_));
  26.          _loc4_.imagePath = _loc2_.@key;
  27.          dispatch(new UpdateEvent(UpdateEvent.UPDATE_TRAINER_INFO,_loc4_));
  28.       }
  29.    }
  30. }
  31.  
  32.