代码:
import flash.display.Sprite;
var c:Class;
c = new Sprite()["constructor"];
trace(1,new c());
c = Sprite["constructor"];
trace(2,c);
trace(3,new c());
结果:
1 [object Sprite]
2 [class Class]
TypeError: Error #1115: Class$ is not a constructor.
at Untitled_fla::MainTimeline/frame1()
因此,从Class中获取构造函数属性会返回一个不是costructor的类。?这是什么意思?为什么它不可实现?