# gotoAndPlay(20) going to frame 1

**URL:** <https://forum.kirupa.com/t/gotoandplay-20-going-to-frame-1/279357>\
**Category:** flash\
**Created:** [January 13, 2009, 10:06pm UTC](https://forum.kirupa.com/t/gotoandplay-20-going-to-frame-1/279357 "2009-01-13T22:06:26Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rachel\_612](https://avatars.discourse-cdn.com/v4/letter/r/5f8ce5/32.png) [@rachel\_612](https://forum.kirupa.com/u/rachel_612)\
**Post date:** [January 13, 2009, 10:06pm UTC](https://forum.kirupa.com/t/gotoandplay-20-going-to-frame-1/279357/1 "2009-01-13T22:06:26Z")

</div>

I am using Flash CS3 with AS2 to write code that will fade images in and out, looping from the last frame back to frame 20. Loading the images with XML is working, as is the fading in and out. Unfortunately, when it reaches frame 390 it loops back to frame 1 instead of frame 20.

In frame 390 I tried using gotoAndPlay(20) to code the loop. Then I tried using \_root.gotoAndPlay(20); but this did not work either. I am not sure why it is playing frame 1 instead of 20.

Thanks in advance for your help and suggestions!

Rachel
