Thanks everybody for your prompt response.
A dude on the FlashMedia List (on which we crossposted) proposed this
solution:
setFunctionNames = function (pObjContainer) {
// Description:
// Sets the property "name" for every Function
// that was found in "pObjContainer"
// Arguments:
// pObjContainer -> Obj|Mc in which to recursively
// search for functions
pObjContainer = pObjContainer || _root;
for (var p in pObjContainer) {
if (typeof pObjContainer[p] == 'object') {
arguments.callee(pObjContainer[p]);
} else if (typeof pObjContainer[p] == 'function') {
pObjContainer[p].name = p; // <-- sets the name
arguments.callee(pObjContainer[p].prototype);
}
}
}
Quick, swift and efficient.
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders