# Problem with gotoAndPlay()

**URL:** <https://forum.kirupa.com/t/problem-with-gotoandplay/207824>\
**Category:** Uncategorized\
**Created:** [November 21, 2006, 9:56pm UTC](https://forum.kirupa.com/t/problem-with-gotoandplay/207824 "2006-11-21T21:56:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![cnboy0212](https://avatars.discourse-cdn.com/v4/letter/c/bc79bd/32.png) [@cnboy0212](https://forum.kirupa.com/u/cnboy0212)\
**Post date:** [November 21, 2006, 9:56pm UTC](https://forum.kirupa.com/t/problem-with-gotoandplay/207824/1 "2006-11-21T21:56:09Z")

</div>

here are my codes:

if(Key.isDown(Key.LEFT)){  
this.gotoAndPlay(5);  
}

but it only stays at frame 5 and doesnt play the rest of the frame  
can any one help me?
