as prototype

//---------------------------------
package {
    public dynamic class CTest {
        public const Name = "CTest";
    }
}
//---------------------------------
CTest.prototype.A = 123;
CTest.prototype.B = function () { trace("CTest B"); };
//function myFunc() { trace("myFunc"); }
//CTest.prototype = myFunc;
 
var obj:CTest = new CTest();
trace(obj.Name); //CTest
trace(obj.A); //123
obj.B(); //CTest B
//obj.C(); //

posted on 2014-01-21 16:18  主人的成长  阅读(105)  评论(0编辑  收藏  举报

导航