# Button event with transparency

**URL:** https://forum.kirupa.com/t/button-event-with-transparency/279054
**Category:** Uncategorized
**Created:** [January 8, 2009, 9:37pm UTC](https://forum.kirupa.com/t/button-event-with-transparency/279054 "2009-01-08T21:37:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kruc3fix](https://avatars.discourse-cdn.com/v4/letter/k/dfb087/32.png) [@kruc3fix](https://forum.kirupa.com/u/kruc3fix)
#### Post date: [January 8, 2009, 9:37pm UTC](https://forum.kirupa.com/t/button-event-with-transparency/279054/1 "2009-01-08T21:37:04Z")

</div>

Hi people !  
This is my first thread. I searched google a lot but didn’t found a reasonable sollution for what I need, so I’m thinking you could help me out.

Here’s the code:

```auto
// add the images
var region1_on:Loader = new Loader();
region1_on.contentLoaderInfo.addEventListener(Event.COMPLETE, region1OnLoad);
region1_on.load(new URLRequest("assets/region1on.png"));
            
var region1_off:Loader = new Loader();
region1_off.contentLoaderInfo.addEventListener(Event.COMPLETE, region1OffLoad);
region1_off.load(new URLRequest("assets/region1off.png"));
        
        
// build the button
var region1_button:SimpleButton = new SimpleButton(region1_off, region1_on, region1_on, region1_on);
addChild(region1_button);

```

Here’s a [demo](http://www.enjoycoding.com/ec_www/flash/Map.html)

The problem is that even though the background of the image is transparent, the event is attacched to the entire image, instead to what’s visible.

Is there a property tht needs to be set to the SimpleButton object in order to make the event react only to non-transparent bitmap data ?
