In ActionScript3 runtime, is there a way to get a list of all static members from a Class
Posted
by ty
on Stack Overflow
See other posts from Stack Overflow
or by ty
Published on 2010-05-07T06:00:57Z
Indexed on
2010/05/07
6:08 UTC
Read the original article
Hit count: 141
flash
|actionscript-3
Let's say we have following class
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);
}
}
}
In Flash Player runtime, is there a way I can get a list of all the static members of lass PlayerEvent.
Something like:
trace(PlayerEvent.staticMethods) // ["PLAYER_INIT", "PLAYER_MOVE", "PLAYER_USE_SKILL"]...
© Stack Overflow or respective owner