Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-06 Thread Muzak
] To: [EMAIL PROTECTED] Sent: Sunday, May 06, 2007 4:09 AM Subject: RE: [Flashcoders] Syntax for dynamically calling a function Any details as to why? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Muzak Sent: Friday, May 04, 2007 11:41 PM To: flashcoders

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-05 Thread Muzak
- Original Message - From: Jesse Graupmann [EMAIL PROTECTED] To: flashcoders@chattyfig.figleaf.com Sent: Friday, May 04, 2007 10:05 PM Subject: RE: [Flashcoders] Syntax for dynamically calling a function My personal favorite is the use of the Delegate loaded with arguments. Happens

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-04 Thread Alistair Colling
Wow, thanks for all your suggestions guys, Lists, I really appreciate the time you took to write your detailed response, I like your third option the best. David thanks for your suggestion I am going to do some further experimentation. I'll also have a look into the Event Dispatcher class

RE: [Flashcoders] Syntax for dynamically calling a function

2007-05-04 Thread Jesse Graupmann
www.jessegraupmann.com www.justgooddesign.com/blog/ _ -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alistair Colling Sent: Friday, May 04, 2007 8:59 AM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] Syntax

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Robert Brisita
You could do something like this: class Something { method1(); method2(a_number:Number); } Somewhere else: var method_str:String = method1; var sm:Something = new Something(); sm[method_str](); // Will call method1 class method sm[method2](0x09F911029D74E35BD84156C5635688C0); // Also

RE: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Danny Kodicek
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alistair Colling Sent: 03 May 2007 15:27 To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Syntax for dynamically calling a function Hi there, I want to call a function but want to

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread R�kos Attila
AC Hi there, I want to call a function but want to able to call it AC dynamically so a string that is passed will determine which function AC is called. AC My reason for this is I have an interface with a number of buttons AC that have different labels but that look the same and need to call

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Alistair Colling
Thanks Robert, I didn't know you could do that. It's a shame you can't use the same square bracket syntax in the FLA without creating a custom class, still this is a neat solution :) Cheers! Ali On 3 May 2007, at 16:04, Robert Brisita wrote: You could do something like this: class

RE: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread David Ngo
: [Flashcoders] Syntax for dynamically calling a function You could do something like this: class Something { method1(); method2(a_number:Number); } Somewhere else: var method_str:String = method1; var sm:Something = new Something(); sm[method_str](); // Will call method1 class method sm[method2

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Lists
The short answer is, you can invoke the function directly by writing: this.onPress = function () { _parent[this._name](); } or, if this looks clearer, you can use the call() method this.onPress = function () { _parent[this._name].call(); } However, there are a few issues with this

Re: [Flashcoders] Syntax for dynamically calling a function

2007-05-03 Thread Lists
That¹s good to know. Thanks, Steven. IIRC, instanceof is faster than typeof. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you