Так, а вот так:
Код:
function getNames(root) {
for (var i in root) {
var item = root[i];
if (typeof item == 'movieclip') {
getClassName(item, _global);
trace('[object '+(__currentClassName ? __currentClassName : 'MovieClip')+', path='+item+']');
delete __currentClassName;
getNames(item);
}
}
}
function getClassName(mc, scope) {
for (var i in scope) {
var item = scope[i];
if (typeof item == 'function' && mc.__proto__ == item.prototype) {
__currentClassName = i;
return;
} else if (typeof item == 'object') {
getClassName(mc, item);
}
}
}
onLoad = function() {
getNames(this);
}
Работает? Судя по MovieClip в трейсе, классы ещё не успели инициализироваться.