home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / humour / trojanhorse.swf / scripts / __Packages / classes / Node.as < prev    next >
Text File  |  2007-03-20  |  1KB  |  57 lines

  1. class classes.Node extends Array
  2. {
  3.    function Node()
  4.    {
  5.       super();
  6.    }
  7.    function _getText()
  8.    {
  9.       return this.__text;
  10.    }
  11.    function _getAt(i)
  12.    {
  13.       trace(this[0]);
  14.       return this[i];
  15.    }
  16.    function _getLast()
  17.    {
  18.       return this[this.length - 1];
  19.    }
  20.    function _getFirst()
  21.    {
  22.       return this[0];
  23.    }
  24.    function _hasNodes()
  25.    {
  26.       return this.length <= 0 ? false : true;
  27.    }
  28.    function _setAttributes(attr)
  29.    {
  30.       this.__attributes = attr;
  31.    }
  32.    function _setText(str)
  33.    {
  34.       this.__text = str;
  35.    }
  36.    function _getAttribute(str)
  37.    {
  38.       for(var _loc3_ in this.__attributes)
  39.       {
  40.          if(_loc3_ == str)
  41.          {
  42.             return this.__attributes[_loc3_];
  43.          }
  44.       }
  45.       return null;
  46.    }
  47.    function _getAllAttribute()
  48.    {
  49.       var _loc2_ = new Object();
  50.       for(var _loc3_ in this.__attributes)
  51.       {
  52.          _loc2_[_loc3_] = this.__attributes[_loc3_];
  53.       }
  54.       return _loc2_;
  55.    }
  56. }
  57.