# Simple Button Help

**URL:** <https://forum.kirupa.com/t/simple-button-help/300787>\
**Category:** flash\
**Created:** [November 27, 2009, 12:13pm UTC](https://forum.kirupa.com/t/simple-button-help/300787 "2009-11-27T12:13:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Still\_Learning](https://avatars.discourse-cdn.com/v4/letter/s/ed8c4c/32.png) [@Still\_Learning](https://forum.kirupa.com/u/Still_Learning)\
**Post date:** [November 27, 2009, 12:13pm UTC](https://forum.kirupa.com/t/simple-button-help/300787/1 "2009-11-27T12:13:32Z")

</div>

I have recently read and practiced the instructions given in “Buttons in Flash” tutorial on this site, and although everything works beautifully it does not give me the code for linkage i.e. either external website or mail.

The existing code is:  
[SIZE=1][COLOR=blue]function setupEvents() {  
// associate events with event handlers  
myButton.addEventListener(MouseEvent.CLICK, clickButtonHandler);  
myButton.addEventListener(MouseEvent.MOUSE\_OVER, hoverButtonHandler);  
}  
setupEvents();[/COLOR][/SIZE]  
[SIZE=1][COLOR=blue]function clickButtonHandler(e:MouseEvent) {  
//trace(“Clicked Button!”);  
outputField.text = “Clicked”;  
}[/COLOR][/SIZE]  
[SIZE=1][COLOR=blue]function hoverButtonHandler(e:MouseEvent) {  
//trace(“Hovered Over Button!”);  
outputField.text = “Hovered”;  
}[/COLOR][/SIZE]

How do I include the relevant behaviours to these buttons?

I would appreciate your URGENT advises.

Thank you in advance.  
Lisa
