home *** CD-ROM | disk | FTP | other *** search
- class com.argosy.ui.baseUI extends MovieClip
- {
- var __width;
- var __height;
- var bounding_box;
- static var symbolName = "__Packages.com.argosy.ui.baseUI";
- static var symbolLinked = Object.registerClass(com.argosy.ui.baseUI.symbolName,com.argosy.ui.baseUI);
- function baseUI()
- {
- super();
- this.init();
- }
- function setSize(nw, nh)
- {
- this._xscale = this._yscale = 100;
- if(nw != null)
- {
- this.__width = nw;
- }
- if(nh != null)
- {
- this.__height = nh;
- }
- this.bounding_box._width = this.__width;
- this.bounding_box._height = this.__height;
- this.layout();
- }
- function get width()
- {
- return this.__width;
- }
- function set width(nw)
- {
- this.setSize(nw,null);
- }
- function get height()
- {
- return this.__height;
- }
- function set height(nh)
- {
- this.setSize(null,nh);
- }
- function init()
- {
- com.gskinner.events.GDispatcher.initialize(this);
- this.bounding_box._visible = false;
- this.setSize(this._width,this._height);
- this.createChildren();
- }
- function createChildren()
- {
- this.layout();
- }
- function layout()
- {
- }
- function _createTextField(tf_parent, tf_name, tf_depth, x, y, w, h, style, text)
- {
- var _loc1_ = tf_parent.createTextField(tf_name,tf_depth,x,y,w,h);
- _loc1_.selectable = false;
- _loc1_.html = true;
- _loc1_.embedFonts = true;
- _loc1_.styleSheet = style;
- _loc1_.htmlText = "<p>" + text + "</p>";
- return _loc1_;
- }
- function toTitleCaps(str)
- {
- var _loc2_ = str.toUpperCase() == str;
- var _loc1_ = str.split(" ");
- for(var _loc3_ in _loc1_)
- {
- if(_loc2_)
- {
- _loc1_[_loc3_] = _loc1_[_loc3_].substr(0,1).toUpperCase() + _loc1_[_loc3_].slice(1,_loc1_[_loc3_].length).toLowerCase();
- }
- else
- {
- _loc1_[_loc3_] = _loc1_[_loc3_].substr(0,1).toUpperCase() + _loc1_[_loc3_].slice(1,_loc1_[_loc3_].length);
- }
- }
- _loc1_ = _loc1_.join(" ").split("-");
- for(_loc3_ in _loc1_)
- {
- _loc1_[_loc3_] = _loc1_[_loc3_].substr(0,1).toUpperCase() + _loc1_[_loc3_].slice(1,_loc1_[_loc3_].length);
- }
- return _loc1_.join("-");
- }
- function trimSpaces(str)
- {
- if(str.charAt(0) == " ")
- {
- return this.trimSpaces(str.substr(1));
- }
- if(str.charAt(str.length - 1) == " ")
- {
- return this.trimSpaces(str.substring(0,str.length - 1));
- }
- return str;
- }
- }
-