# Code to go to a button and click it!

**URL:** <https://forum.kirupa.com/t/code-to-go-to-a-button-and-click-it/313673>\
**Category:** flash\
**Created:** [September 7, 2010, 1:45am UTC](https://forum.kirupa.com/t/code-to-go-to-a-button-and-click-it/313673 "2010-09-07T01:45:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pripir](https://avatars.discourse-cdn.com/v4/letter/p/ed655f/32.png) [@pripir](https://forum.kirupa.com/u/pripir)\
**Post date:** [September 7, 2010, 1:45am UTC](https://forum.kirupa.com/t/code-to-go-to-a-button-and-click-it/313673/1 "2010-09-07T01:45:41Z")

</div>

Is there any way to use as3 to go to a button sitting on a frame and (using just script) click it to play movie? I have 15 sec movie inside other movie, so I want after 15 sec to use some code to go back to a button on a previous frame and push it but using just actionscript 3.  
This is script I have on a button which I want to execute:

iphone\_btn.addEventListener(MouseEvent.CLICK, buttonClick);  
function buttonClick(event:MouseEvent):void{  
gotoAndPlay(62);  
};

Hope you know what I mean.  
Thanks
