I'm pretty sure there is no reflection-type functionality in AS3 to return a
method name.

Maybe you can define a bunch of string constants (perhaps even as static
members in a class you create for this purpose, to hold them in one place)
and use them as parms to addCallback().

Then you would still have to make sure there are no typos in the function
names you use to initialize them, but the compiler will inform you whenever
you are spelling them incorrectly when sending them as parameters to
addCallback().

(I hope I am understanding your question).

A


On Tue, Aug 26, 2008 at 2:57 AM, Rob Sampson <[EMAIL PROTECTED]> wrote:

> I've been working with ExternalInterface.addCallback, and I think it's a
> drag that you have to send the name of a function as a String - it seems
> like there should be a way to get the name of a function dynamically the
> same way Event uses public static constants for their strings – so the
> compiler can find my misspellings! It's not a huge problem but (as with
> everything in the ExternalInterface) it seems like the implementation
> wasn't
> thought out, and doesn't jive with the rest of the language. So how about
> it
> gurus...any cool toString/prototype/constructor override tricks?
> _______________________________________________
> Flashcoders mailing list
> Flashcoders@chattyfig.figleaf.com
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to