<p>I have a Canvas in a Flex application which has items inside it that cover only about 50% of the area of the main canvas.</p>

<p>i want the canvas to respond to <code>rollOver</code> events for the full area, and not just the area that is covered by the items inside.</p>

<p>I have been setting the following attributes to achieve this :</p>

<pre><code>&lt;mx:Canvas backgroundColor="white"
backgroundAlpha=".01"
rollOver="rollOver(event)"&gt;...
</code></pre>

<p>This causes the entire canvas to respond to rollOver events. It works great - I'm just not happy with it and figure there must be a better way to achieve it. </p>

<p>Is there a way to force mouse events to act on the entire area of a UIComponent?</p>

You could do this:
```
```
import flash.event.MouseEvent;
...
canvas.addEventListener(MouseEvent.ROLL_OVER,function(event:MouseEvent):void {
    ...
});
```
```
where "canvas" is the ID of the canvas in your mxml.