假设我们有以下课程
public class PlayerEvent extends Event
{
public static const PLAYER_INIT:String = "playerInit";
public static const PLAYER_MOVE:String = "playerMove";
public static const PLAYER_USE_SKILL:String = "playerUseSkill";
public function PlayerEvent(type:String)
{
super(type, false, true);
}
}
}
在Flash Player运行时,有没有办法可以获得lass PlayerEvent的所有静态成员列表。
类似的东西:
trace(PlayerEvent.staticMethods) // ["PLAYER_INIT", "PLAYER_MOVE", "PLAYER_USE_SKILL"]...