Is there any benefit to removing the event parameter from event handlers if it's not used? I have the following instance:
<s:Button rollOver="handleRollOver(event)" rollOut="handleRollOut(event)"/>
And the following code:
private function handleRollOver(event:Event):void
{
// doing stuff
}
private function handleRollOut(event:Event):void
{
// doing stuff
}
Is there any benefit to removing the event object if it's not used? For example, changing it to this:
<s:Button rollOver="handleRollOver()" rollOut="handleRollOut()"/>
And the following code:
private function handleRollOver():void
{
// doing stuff
}
private function handleRollOut():void
{
// doing stuff
}
The reason I ask is for a couple of reasons. One is that I heard that events bubble through all the display objects so if you can stop them that saves some CPU (not sure how much). But that would involve calling event.stopProp() type of calls correct not merely and at capture time rather than bubble time? Also, I heard that typing the event helps save CPU, so event:Event is slower than event:MouseEvent. I can try and find sources but until then maybe someone knows what I'm talking about. Thanks