topical media & game development

talk show tell print

actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType.ax

actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType.ax [swf] flex


  package 
  {
          
Combination value object and enumeration class whose values represent the types of images that are available to be used as filter targets in the FilterWorkbench application.

  
          public class @ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType
          {
                  public static const IMAGE1:@ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType = new @ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType("Bitmap image 1", "actionscript-book-FilterWorkbench-images-sampleImage1.jpg");
                  public static const IMAGE2:@ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType = new @ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType("Bitmap image 2", "actionscript-book-FilterWorkbench-images-sampleImage2.jpg");
                  public static const SWF:@ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType = new @ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType("SWF animation", "actionscript-book-FilterWorkbench-images-sampleAnimation.swf");
                  
                  
                  public static function getImageTypes():Array
                  {
                          return new Array(IMAGE1, IMAGE2, SWF);
                  }
                  
                  // ------- Private vars -------
                  private var _name:String;
                  private var _url:String;
                  
                  
                  // ------- Constructor -------
                  public function @ax-actionscript-book-FilterWorkbench-com-example-programmingas3-filterWorkbench-ImageType(name:String, url:String)
                  {
                          _name = name;
                          _url = url;
                  }
                  
                  
                  // ------- Public properties -------
                  public function get name():String
                  {
                          return _name;
                  }
                  
                  
                  public function get url():String
                  {
                          return _url;
                  }
          }
  }


(C) Æliens 27/08/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.