主题:  Constructor 在 flashmx 还未列出。

torain

职务:普通成员
等级:1
金币:0.0
发贴:33
注册:2000/12/1 17:05:57
#12002/3/14 11:59:35
Dog = function( )
{
this.instNum = ++this.constructor.count;
}
// these next two properties aren't really part of the 'constructor'
Dog.count = 0; // used to count how many Dogs have been created
Dog.className = "Dog"; // used to remember the name of the class
rover = new Dog( );
fido = new Dog( );
trace( rover.instNum ); // 1 (first Dog created)
trace( fido.instNum ); // 2 (second Dog created)
trace( rover.constructor.className ); // Dog


这里用到的 constructor 在 flashmx 还是 undocument 阿。



5D荣誉斑竹

职务:普通成员
等级:3
金币:10.0
发贴:751
注册:2001/5/21 21:43:30
#22002/3/16 15:06:43
在中国cf是很难红起来的。