home *** CD-ROM | disk | FTP | other *** search
/ PCGUIA 2010 Software/Programs / PCGuia_programas.iso / Software / Utils / Livebrush / Install-LivebrushLite.air / livebrush.swf / scripts / com / livebrush / ui / SamplePropsView.as < prev    next >
Encoding:
Text File  |  2009-10-26  |  1.3 KB  |  51 lines

  1. package com.livebrush.ui
  2. {
  3.    import com.livebrush.data.Settings;
  4.    import com.livebrush.events.UpdateEvent;
  5.    import com.livebrush.utils.Update;
  6.    
  7.    public class SamplePropsView extends UIView
  8.    {
  9.       public var uiAsset:SamplePropsUI;
  10.       
  11.       public function SamplePropsView(ui:UI)
  12.       {
  13.          super(ui);
  14.          init();
  15.       }
  16.       
  17.       override protected function createView() : void
  18.       {
  19.          this.uiAsset = new SamplePropsUI();
  20.          this.uiAsset.cacheAsBitmap = true;
  21.          this.uiAsset.sampleHead.label.text = "Location".toUpperCase();
  22.       }
  23.       
  24.       override public function set settings(data:Settings) : void
  25.       {
  26.          this.uiAsset.color.selectedColor = data.color;
  27.       }
  28.       
  29.       override public function update(update:Update = null) : void
  30.       {
  31.          if(update.type == UpdateEvent.COLOR)
  32.          {
  33.             this.settings = Settings(update.data);
  34.          }
  35.       }
  36.       
  37.       override public function get settings() : Settings
  38.       {
  39.          var settings:Settings = new Settings();
  40.          settings.color = this.uiAsset.color.selectedColor;
  41.          return settings;
  42.       }
  43.       
  44.       override protected function createController() : void
  45.       {
  46.          controller = new SamplePropsController(this);
  47.       }
  48.    }
  49. }
  50.  
  51.