# gotoAndPlay issue

**URL:** <https://forum.kirupa.com/t/gotoandplay-issue/294447>\
**Category:** Uncategorized\
**Created:** [August 14, 2009, 1:57am UTC](https://forum.kirupa.com/t/gotoandplay-issue/294447 "2009-08-14T01:57:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Press\_Tilty](https://avatars.discourse-cdn.com/v4/letter/p/e480ec/32.png) [@Press\_Tilty](https://forum.kirupa.com/u/Press_Tilty)\
**Post date:** [August 14, 2009, 1:57am UTC](https://forum.kirupa.com/t/gotoandplay-issue/294447/1 "2009-08-14T01:57:00Z")

</div>

Heh…sorry for posting so much recently :emb: (but you guys are soooo helpful), but heres an issue i have:  
[skip my story if you want too]  
in my character, his hat changes color (amid other things), and i coded in the color, but the only way for it not to switch colors was to have the moving clip in the time line,  
[end story]

so i have a

```auto

on (keyPress "<Right>") 
{
	gotoAndPlay(2);
	this._xscale = 100;
}

```

so it works fine until it reaches the end of the 24 frame animation (2-25)  
at the end of the animation, it jitters between two frames (probably 2/26), but when i let go of the right (or left) key, it animates perfectly. what should i do

Here’s what Iv’e tried:  
[LIST]  
[_]On frame 26: gotoAndPlay(2);  
[_]Changing the little drop down boxes from “Repeat” to “Loop” and “Stream” to “Start” I suspect that didn’t work because it is a two layer, with 4 total tweens animation.  
[\*]No code, no nothing on the last frame  
[/LIST]
