# Button code doesn't work

**URL:** <https://forum.kirupa.com/t/button-code-doesnt-work/317399>\
**Category:** Uncategorized\
**Created:** [December 19, 2010, 5:19am UTC](https://forum.kirupa.com/t/button-code-doesnt-work/317399 "2010-12-19T05:19:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![learner\_7n](https://avatars.discourse-cdn.com/v4/letter/l/b2d939/32.png) [@learner\_7n](https://forum.kirupa.com/u/learner_7n)\
**Post date:** [December 19, 2010, 5:19am UTC](https://forum.kirupa.com/t/button-code-doesnt-work/317399/1 "2010-12-19T05:19:40Z")

</div>

Hi,

I have a Rectangle Box called (Panel1\_mc). And inside it there is a button called (BoardMessage1\_btn). When I click on this button, the Rectange Panel should move upwards. Right now it is on the bottom of the page. The following code throws an 1010 error:

Panel1\_mc.BoardMessage1\_btn.addEventListener(MouseEvent.CLICK, clickSection);  
function clickSection(evtObj:MouseEvent){  
var Panel1Tween:TweenMax = new TweenMax(Panel1\_mc, 6, {y:450, delay:1, ease:Strong.easeOut});  
}

What is wrong with this code? Please help.
