// // Static MovieClip Extention Class // author: Ted Patrick // email: ted@powersdk.com // version: 1.0 // // Supports dynamic instanciation // Binds MovieClipDataType to Class with Arguments // // Usage: MCE.attachEmpty( scope, name, depth [,initObj] [,class] [,classArguments]) // // // Usage: MCE.attachMovie( scope, linkage, name, depth [,initObj] [,class] [,classArguments]) // class MCE { static function attachEmpty(t,n,d,i,c,ca){ var a = MovieClip.prototype.createEmptyMovieClip.apply(t,[n,d]) if(a==undefined){ throw new Error("attachEmpty failed") return } for(var b in i){ a[b] = i[b] } if(c != undefined){ a.__proto__ = c.prototype c.apply(a,ca==undefined?[]:ca) } return a } static function attachMovie(t,l,n,d,i,c,ca){ var a = MovieClip.prototype.attachMovie.apply(t,[l,n,d,i]) if(a==undefined){ throw new Error("attachMovie failed") return } if(c != undefined){ a.__proto__ = c.prototype c.apply(a,ca==undefined?[]:ca) } return a } }