Is this the most efficient way to listen to mouse events on the background of a group?
<s:Group width="200" height="100" rollOver="group1_rollOverHandler(event)" rollOut="group1_rollOutHandler(event)">
<s:Rect width="100%" height="100%">
<s:fill>
<s:SolidColor alpha="0"/>
</s:fill>
</s:Rect>
</s:Group>
seems pretty minimal, but alpha = 0 is not the most efficient thing out there.
I’m listening for
mouseDownandmouseUpon aGroupwith nothing in it (for dragging) and it’s working just fine. A quick test withrollOverandrollOutreveals those events to be fired as expected.I’d do this as it avoids having a fill with
alpha=0:EDIT: Realized I forgot to directly address the question. Narf!
To the best of my knowledge this is the most efficient way to listen for mouse events on a
Groupsince we are not drawing anything at all, ever by using an emptyGroup.