# Simple Button Behavior

**URL:** <https://forum.kirupa.com/t/simple-button-behavior/208510>\
**Category:** flash\
**Created:** [November 29, 2006, 3:30pm UTC](https://forum.kirupa.com/t/simple-button-behavior/208510 "2006-11-29T15:30:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![radarguy](https://avatars.discourse-cdn.com/v4/letter/r/ba9def/32.png) [@radarguy](https://forum.kirupa.com/u/radarguy)\
**Post date:** [November 29, 2006, 3:30pm UTC](https://forum.kirupa.com/t/simple-button-behavior/208510/1 "2006-11-29T15:30:08Z")

</div>

Hi All,  
I feel this is such a simple issue yet I cannoth find anything on it. I do not understand why I cannot get a created button to behave like a component button with listeners. Due to the created button the size of the .fla file exceeds the forum limit so if you are interested in this please email me and I will forward it to you, about 750 kb. There is something I am missing.  
Here is the simple code:

// create a listener object for the Submit button  
// this is a component button  
btnSubmitListener = new Object();  
// register the submit button listener listen for the click events  
btnSubmit.addEventListener(“click”,btnSubmitListener);  
btnSubmitListener.click = function(){  
// user clicked the submit button

checkboxStatus.text = “Submit Button pressed”;  
}  
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++  
// create a listener object for the Trace button  
// this is a created button  
btnTraceListener = new Object();  
// register the submit button listener listen for the click events  
btnTrace.addEventListener(“click”,btnTraceListener);  
btnTraceListener.click = function(){  
// user clicked the submit button

checkboxStatus.text = “Trace button pressed”;  
}  
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++  
// create a listener object for the Reset button  
// this is a component button  
btnResetListener = new Object();  
// register the submit button listener listen for the click events  
btnReset.addEventListener(“click”,btnResetListener);  
btnResetListener.click = function(){  
// user clicked the submit button

checkboxStatus.text = “Reset button pressed”;  
}

In my final application I guess I could place my code in the button action but everything else I am inputting is done with listeners and there are upgrades to come that will work better that way too. I have tried the Broadcast method but not been successful with that either. Any help would be greatly appreciated.  
Russell
