【发布时间】:2011-12-04 16:07:14
【问题描述】:
我有以下课程,我想做 cmets 中的内容 我知道我可以用条件来做到这一点。 我想知道是否有办法做到这一点。
此代码在 AS3 中,但我知道这可能与 javascript 有关,因为 AS3 是基于 ECMAScript
public class ClientStatus
{
public static const INVITED:int = 0;
public static const VIP:int = 1;
public static const MASTER:int = 2;
public static const GRAND_MASTER:int = 3;
public static const IMORTAL:int = 4;
public static const GOD:int = 5;
public static function getName(status:int):String
{
// to get the name related to int value
// ex: if status equals to 3 return "GRAND_MASTER"
}
}
【问题讨论】:
标签: javascript actionscript-3 static