[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnash-dev] How do I implement a function in a flash package?

From: Tom Stellard
Subject: Re: [Gnash-dev] How do I implement a function in a flash package?
Date: Tue, 26 Aug 2008 14:28:57 +0800

> 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:


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?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]