home *** CD-ROM | disk | FTP | other *** search
/ 404 Jogos / CLJG.iso / Diversos / Beez.swf / scripts / game / controller / ScoresInitCommand.as < prev    next >
Encoding:
Text File  |  2008-09-03  |  918 b   |  29 lines

  1. package game.controller
  2. {
  3.    import game.view.AppMediator;
  4.    import game.view.ScoresMediator;
  5.    import game.view.components.ScoresView;
  6.    import org.puremvc.as3.interfaces.ICommand;
  7.    import org.puremvc.as3.interfaces.INotification;
  8.    import org.puremvc.as3.patterns.command.SimpleCommand;
  9.    
  10.    public class ScoresInitCommand extends SimpleCommand implements ICommand
  11.    {
  12.        
  13.       
  14.       public function ScoresInitCommand()
  15.       {
  16.          super();
  17.       }
  18.       
  19.       override public function execute(note:INotification) : void
  20.       {
  21.          var appMed:AppMediator = facade.retrieveMediator(AppMediator.NAME) as AppMediator;
  22.          var scoresView:ScoresView = new ScoresView();
  23.          appMed.getScoresContainer().addChild(scoresView);
  24.          var scoresMed:ScoresMediator = new ScoresMediator(scoresView);
  25.          facade.registerMediator(scoresMed);
  26.       }
  27.    }
  28. }
  29.