I agree. I can see both sides of the point--more granular encapsulation,
etc. However, in addition to creating more breadcrumbs to follow, it may not
be all that practical in every case. You may not always know you need this
and may have to deal with less manageable code more and more as the need
a
I disagree with this approach. It's unnecessary and makes code less
manageable. It's cleaner to set the argument as optional (event = null)
than write another subroutine.
Matt S. wrote:
You might want to separate the functions, so you would have
myFunction(), which you could call from anyw
If you're not actually accessing any of the properties of the MouseEvent
in your listener function, you could do the following:
(...args)
or you could keep it strict and use
(e:MouseEvent = null)
Either works fine, though the second one is explicitly cleaner.
Omar Fouad wrote:
Hi,
I've go
You can also just send null.
myFunction(null);
On 4/5/08 9:38 PM, "jonathan howe" wrote:
> Technically speaking, you can instantiate a bogus MouseEvent to call the
> function:
>
> myFunction(new MouseEvent(MouseEvent.CLICK));
>
> However, I only mention this to be complete in directly answeri
Oops. I forgot to include a link to post about this. Here it is:
http://www.learningactionscript3.com/2007/11/21/mandatory-argument-types/
On 4/5/08 8:58 PM, "Omar Fouad" wrote:
> Hi,
> I've got a function that is called when a listener listens an event like:
>
> fancyButton.addEventListener(Mo
// version 1
private function myFunction(e:MouseEvent):void {
// statements...
}
fancyButton.addEventListener(MouseEvent.CLICK, myFunction);
fancyButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
//version 2
private function myFunction(e:MouseEvent):void {
// statements...
}
fancyButton
Technically speaking, you can instantiate a bogus MouseEvent to call the
function:
myFunction(new MouseEvent(MouseEvent.CLICK));
However, I only mention this to be complete in directly answering the
question. I would think that Matt's suggestion is the more appropriate.
-jonathan
On Sat, Apr 5
On Sat, Apr 5, 2008 at 8:58 PM, Omar Fouad <[EMAIL PROTECTED]> wrote:
> Hi,
> I've got a function that is called when a listener listens an event like:
>
> fancyButton.addEventListener(MouseEvent.CLICK, myFunction);
>
> private function myFunction(e:MouseEvent):void {
>// statements...
> }
Hi,
I've got a function that is called when a listener listens an event like:
fancyButton.addEventListener(MouseEvent.CLICK, myFunction);
private function myFunction(e:MouseEvent):void {
// statements...
}
If I try to call myFunction using myFunction() , the compiler throws me an
error, sayin
Nope, only to dynamic and input type textfields.
Greetz Erik
On 4/3/08, laurent <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> Does TextFormat apply to none dynamic textfield ?
>
> thx
> L
>
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http:
10 matches
Mail list logo