This is great - thank you....

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Ian Thomas
Sent: 28 October 2008 08:46
To: Flash Coders List
Subject: Re: [Flashcoders] AS3 - Checking if a Function Exists

Method:

    public static function refExists(obj:Object,name:String):Boolean
    {
        try
        {
            if (obj[name]!=null)
                return true;
        }
        catch (e:ReferenceError) {}
        return false;
    }

HTH,
   Ian

On Tue, Oct 28, 2008 at 8:36 AM, Ian Thomas <[EMAIL PROTECTED]> wrote:
> Or, thinking about it, you could catch the reference error in a
> try/catch block. It's more of a kludge, but might give you much higher
> performance!
>
> Ian
>
_______________________________________________
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