This works with as3 and flex 4.5.1
public static function isValidValue(type:String):Boolean { var m_constNameList:XMLList = describeType(Layers).descendants("constant"); for each(var obj:Object in m_constNameList){ if (type == Layers[ obj.@name ]){ return true; } } return false; }
marco source share