Why does click work here?

<mx:Button id="btnFoo" label="Foo x 2" click="Foo(2)"/>


But not here?

btnFoo.addEventListener(MouseEvent.CLICK,Foo(2));

Now, it's obviously Adobe has coded the button component to allow for
arguments to be passed via the click parameter.  But we're not given
that same privilege when using just AS3.

But obviously, they must have already coded this functionality. I'd
rather not have to re-invent the horse. Any answers?

Reply via email to