Hey Guys, check this out

Var clickHandler:Function = MyClass.staticMethod;
var args:Array = ['Can', 'pass', 'in', 'any', 'amount'];
newBtn.addEventListener("click", Delegate.create(this, function(evt:Object,
meth:Function, args:Array) { meth.apply(null, args) }, clickHandler, args )
); 



Regards,
 
Bjorn Schultheiss
Senior Flash Developer
QDC Technologies

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of dnk
Sent: Monday, 14 August 2006 5:17 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] |:::| can you write dynamic meathods in a class?

Ramon Miguel M. Tayag wrote:
> Sometimes some events pass their own args and you dont even see them..
>
> Try changing your function to this:
>
> function onHit1(o:Object, n:Number) //the o object is passed by the 
> listener {
>    trace("it was hit with the number: " + n); }
>
That worked perfect!!!!!!!


Thanks sooo much!

d
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to