# Problem with gotoandPlay

**URL:** https://forum.kirupa.com/t/problem-with-gotoandplay/257679
**Category:** flash
**Created:** [April 16, 2008, 9:07am UTC](https://forum.kirupa.com/t/problem-with-gotoandplay/257679 "2008-04-16T09:07:14Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![genjuro](https://avatars.discourse-cdn.com/v4/letter/g/e19b73/32.png) [@genjuro](https://forum.kirupa.com/u/genjuro)
#### Post date: [April 16, 2008, 9:07am UTC](https://forum.kirupa.com/t/problem-with-gotoandplay/257679/1 "2008-04-16T09:07:14Z")

</div>

Hello there. I am having a problem and i cant figure it out…  
In my main timelime i have some buttons and movie clip symbols. When i press for example a button which is a photo i use the following code

on(release) {  
gotoAndPlay(“start”);  
photosmc.gotoAndPlay(“img1”);

}

It goes to the “start” position where a symbol named photosmc exists and inside this symbol i have a timeline with many layers and it goes next on position “img1” where i have one image that appears.So far so good.Now,when the image appears and stops i want to have a button “X” and when i press it to gotoandPlay on my main timeline in a different position.In other words to leave-exit this symbol and return to the previous timelime.The problem is that photosmc is in a timeline and the button X is in the timeline of the photsmc…so how is it possible to press it and gotoandPlay a level upstairs??? I tried but it wont work…

Can someone help me on this please???
