xmlns:mx="library://ns.adobe.com/flex/mx"
xmlns:s="library://ns.adobe.com/flex/spark"
creationComplete="getDetails()">
import flash.utils.*;
public function getDetails():void {
var classInfo:XML = describeType(button1);
ta2.text = classInfo.toString();
ta1.text = "Class " + classInfo.@name.toString() + "\n";
for each (var v:XML in classInfo..variable) {
ta1.text += "Variable " + v.@name + "=" + button1[v.@name] + " (" + v.@type + ")\n";
}
for each (var a:XML in classInfo..accessor) {
if (a.@access == 'writeonly') {
ta1.text += "Property " + a.@name + " (" + a.@type +")\n";
}else {
ta1.text += "Property " + a.@name + "=" + button1[a.@name] + " (" + a.@type +")\n";
}
}
for each (var m:XML in classInfo..method) {
ta1.text += "Method " + m.@name + "():" + m.@returnType + "\n";
}
}