# Button Mode for Icon

**URL:** https://forum.kirupa.com/t/button-mode-for-icon/267290
**Category:** flash
**Created:** [July 30, 2008, 12:33pm UTC](https://forum.kirupa.com/t/button-mode-for-icon/267290 "2008-07-30T12:33:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![seek\_nik](https://avatars.discourse-cdn.com/v4/letter/s/f17d59/32.png) [@seek\_nik](https://forum.kirupa.com/u/seek_nik)
#### Post date: [July 30, 2008, 12:33pm UTC](https://forum.kirupa.com/t/button-mode-for-icon/267290/1 "2008-07-30T12:33:49Z")

</div>

Hello All,

Here I am loading Icon,

//function definition to apply Icon in the button  
private function applyIcon()  
{

```
         var urlIconPath:URLRequest = new URLRequest(getButtonIcon());
         loadIcon.load(urlIconPath);
         loadIcon.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadEventCompletion);
         
    }

    //function to invoke after icon loaded
    private function onLoadEventCompletion(event:Event):void 
    {
        var loadIcon:Loader = Loader(event.target.loader);
        var image:Bitmap = Bitmap(loadIcon.content);
        var bitmapData:BitmapData = image.bitmapData;
        trace(bitmapData.width,bitmapData.height);
        loadIcon.x = getX_Position()- bitmapData.width/2;
        loadIcon.y = getY_Position()- bitmapData.height/2;
    }

```

Now it is coming over a circle shape and I am making that circle.buttonMode = true, but the moment I am taking the cursor over the icon which is over the circle, the hand cursor is not coming.

Can anybody please tell how to make button mode true for that icon.
