> I have tried adding the package to the native class array, but the AVM2
> still cannot find the function when I search the global object, using the
> as_object::findProperty function.
With the AVM1 layout, and what you find in the 'flash' package as existing
gnash code, you need to fully qualify the names, thus:
flash.utils.getQualifiedClassName();
Any other way to call it must rely on scope chain (which usually ends
with the _global object being scanned).
I think this is what AVM2 is trying to do. AVM2 takes a property 'getQualifiedClassName' and a namespace 'flash.utils' and searches the objects in the scope stack for a match. The Global object is always one of the objects in the scope stack. Is it best for me to add this property directly to the gobal object, with a call like global.init_member("getQualifiedClassName,new builtin_function(getQualifiedClassName),flags,NSV::NS_FLASH_UTILS); or is there some way to search the global object and all of its "children" for a match, so in this case, the search would go Global->flash->utils->getQualifiedClassName?
Thanks.
-Tom