Skip to content

Instantly share code, notes, and snippets.

@sugamasao
Created June 30, 2010 05:30
Show Gist options
  • Save sugamasao/458269 to your computer and use it in GitHub Desktop.
Save sugamasao/458269 to your computer and use it in GitHub Desktop.
// 対象のクラスはなんでも良い
// describeType したクラスの public 変数 を列挙して、内容を出力する
// 参考
// http://livedocs.adobe.com/flash/9.0_jp/ActionScriptLangRefV3/flash/utils/package.html#describeType()
// http://www.be-interactive.org/?itemid=26
var hoge:UIComponent = this as UIComponent;
var xml:XML = describeType(hoge);
for each(var list:XML in xml.variable) {
trace("public var", list.@name, ":", list.@type, "=", hoge[list.@name])
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment