home *** CD-ROM | disk | FTP | other *** search
/ Practice Anatomy Lab / PAL.ISO / pc / PAL.swf / scripts / __Packages / com / argosy / ui / PopWindow.as < prev    next >
Encoding:
Text File  |  2007-03-19  |  1.6 KB  |  57 lines

  1. class com.argosy.ui.PopWindow extends com.argosy.ui.baseUI
  2. {
  3.    var label_tf;
  4.    var text_format;
  5.    var bg;
  6.    var content_mc;
  7.    var drop_shadow;
  8.    function PopWindow()
  9.    {
  10.       super();
  11.    }
  12.    function set label(str)
  13.    {
  14.       this.label_tf.text = str;
  15.    }
  16.    function get label()
  17.    {
  18.       return this.label_tf.text;
  19.    }
  20.    function init()
  21.    {
  22.       this.text_format = new TextFormat();
  23.       this.text_format.font = "Frutiger Bold";
  24.       this.text_format.size = 14;
  25.       this.text_format.color = 2046576;
  26.       this.text_format.kerning = true;
  27.       this.text_format.align = "left";
  28.       super.init();
  29.    }
  30.    function createChildren()
  31.    {
  32.       this.bg = this.createEmptyMovieClip("bg",1);
  33.       this.content_mc = this.createEmptyMovieClip("content_mc",2);
  34.       this.label_tf = this.createTextField("label_tf",3,0,0,this.width,this.height);
  35.       this.label_tf.type = "input";
  36.       this.label_tf.embedFonts = true;
  37.       this.label_tf.setNewTextFormat(this.text_format);
  38.       this.drop_shadow = new flash.filters.DropShadowFilter(10,45,0,0.8,10,10,1,3,false,false,false);
  39.    }
  40.    function layout()
  41.    {
  42.       this.bg.clear();
  43.       this.bg.lineStyle(0,13421772,100);
  44.       this.bg.beginFill(16777215,100);
  45.       this.bg.lineTo(this.width,0);
  46.       this.bg.lineTo(this.width,this.height);
  47.       this.bg.lineTo(0,this.height);
  48.       this.bg.lineTo(0,0);
  49.       this.bg.endFill();
  50.       this.bg.filters = [this.drop_shadow];
  51.       this.label_tf._y = 2;
  52.       this.label_tf._x = 2;
  53.       this.label_tf._width = this.width - 4;
  54.       this.label_tf._height = this.height - 4;
  55.    }
  56. }
  57.