# Actionscript issues with ENTER\_FRAME

**URL:** https://forum.kirupa.com/t/actionscript-issues-with-enter-frame/299237
**Category:** flash
**Created:** [November 1, 2009, 11:42pm UTC](https://forum.kirupa.com/t/actionscript-issues-with-enter-frame/299237 "2009-11-01T23:42:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ferretinthebush](https://avatars.discourse-cdn.com/v4/letter/f/7993a0/32.png) [@ferretinthebush](https://forum.kirupa.com/u/ferretinthebush)
#### Post date: [November 1, 2009, 11:42pm UTC](https://forum.kirupa.com/t/actionscript-issues-with-enter-frame/299237/1 "2009-11-01T23:42:27Z")

</div>

Hi,

I’m having trouble with this script below. Basically I want the movie to goto ‘scene 771’  
as soon as the playhead reaches this frame…here’s the script

addEventListener(Event.ENTER\_FRAME,myFunction2);  
function myFunction2(event:Event) {  
gotoAndPlay(1, “Scene 771”);  
}

The script does take the movie to scene 771, but it doesn’t play the scene, it goes to frame 1 and stops. Also, The movie seems to get buggy as it wont play even if I right click and hit play or forward  
Does anyone know why it does this? Or how I can solve the problem??
