# Clickable .jpg or .gif (buttons)

**URL:** <https://forum.kirupa.com/t/clickable-jpg-or-gif-buttons/330568>\
**Category:** flash\
**Created:** [February 10, 2013, 2:49am UTC](https://forum.kirupa.com/t/clickable-jpg-or-gif-buttons/330568 "2013-02-10T02:49:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![bking20](https://avatars.discourse-cdn.com/v4/letter/b/e495f1/32.png) [@bking20](https://forum.kirupa.com/u/bking20)\
**Post date:** [February 10, 2013, 2:49am UTC](https://forum.kirupa.com/t/clickable-jpg-or-gif-buttons/330568/1 "2013-02-10T02:49:50Z")

</div>

I’m having some trouble turing an embedded image into a clickable button. Is there a quick way to do this. Here’s an idea of what i’ve tried thus far:

[Embed(source = “/…/lib/pic.jpg”)]  
public var pic:Class;

var button:Spite = new Sprite();  
var picButton:Bitmap = new pic();

button.buttonMode=true;  
button.useHandCursor=true;

button.addChild(picButton);  
button.addEventListener(MouseEvent.CLICK, function);

Am I close? ;(
