# Should be simple to answer: button on movie clip

**URL:** <https://forum.kirupa.com/t/should-be-simple-to-answer-button-on-movie-clip/267342>\
**Category:** flash\
**Created:** [July 30, 2008, 11:19pm UTC](https://forum.kirupa.com/t/should-be-simple-to-answer-button-on-movie-clip/267342 "2008-07-30T23:19:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericvecchi](https://avatars.discourse-cdn.com/v4/letter/e/6bbea6/32.png) [@ericvecchi](https://forum.kirupa.com/u/ericvecchi)\
**Post date:** [July 30, 2008, 11:19pm UTC](https://forum.kirupa.com/t/should-be-simple-to-answer-button-on-movie-clip/267342/1 "2008-07-30T23:19:26Z")

</div>

Help! I have a what should be a simple problem. I am relatively new to AS3. I am using the following code to return a value when a button is clicked. The buttons are located in a movie clip that has been put on the stage.

CODE:  
//stops the movie clip from playing  
movieClip2.stop()

//this will return the value of each button that is clicked  
movieClip2.d0.index = 0  
movieClip2.d1.index = 1  
movieClip2.d2.index = 2  
movieClip2.d3.index = 3

//this sets the answerClick function for each butoon  
movieClip2.d0.addEventListener(MouseEvent.CLICK, answerClick)  
movieClip2.d1.addEventListener(MouseEvent.CLICK, answerClick)  
movieClip2.d2.addEventListener(MouseEvent.CLICK, answerClick)  
movieClip2.d3.addEventListener(MouseEvent.CLICK, answerClick)

//this function will change once I can get the buttons to work once clicked  
function answerClick( evt ) {  
trace(“hilly billy”)  
[//myPushBox.x](https://myPushBox.x) = myPushBox.x + 10  
}

Currently when I test this code it gives me this error:  
ReferenceError: Error #1056: Cannot create property index on flash.display.SimpleButton

Any help is greatly appreciated.

Thanks!
