0
比方说,我们有下面的类在ActionScript3中运行时,有没有办法从类中获取所有静态成员的名单
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"]...
谢谢,这正是我要找的答案 – 2010-05-09 15:22:10