/////////////////////////////////////////////////////////////////////////////
//
//name: Object.prototype.copy
//
//
COPYRIGHT © 2001-2004 ALL RIGHTS RESERVED
//
@link [http://WWW.POWERSDK.COM, PowerSDK Software Corp. "Code for a distributed world"]
//
@link [http://WWW.powersdk.com/dev/license, License]
//
Author @email [ted@powersdk.com, Theodore E Patrick]
//
Created May 16, 2002
//
Modified Oct 4, 2003
//
//
/////////////////////////////////////////////////////////////////////////////
Object.prototype.copy = function(){
if(this.__proto__.constructor == XMLNode){
var ret = new XML(this.toString())
trace(this.toString())
}else{
var ret = new this.__proto__.constructor()
for(var n in this){
if(this[n].__proto__.constructor == XMLNode){
ret[n] = new XML(this[n].toString())
}else if(typeof(this[n]) == 'object'){
ret[n] = this[n].copy()
}else{
ret[n] = this[n]
}
}
}
return ret
}
ASSetPropFlags(Object.prototype,"copy",1)