# nextFrame( ) Y U NO WORK

**URL:** https://forum.kirupa.com/t/nextframe-y-u-no-work/327574
**Category:** flash
**Created:** [March 10, 2012, 5:28pm UTC](https://forum.kirupa.com/t/nextframe-y-u-no-work/327574 "2012-03-10T17:28:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shinji\_Barbra](https://avatars.discourse-cdn.com/v4/letter/s/ba9def/32.png) [@Shinji\_Barbra](https://forum.kirupa.com/u/Shinji_Barbra)
#### Post date: [March 10, 2012, 5:28pm UTC](https://forum.kirupa.com/t/nextframe-y-u-no-work/327574/1 "2012-03-10T17:28:16Z")

</div>

Hey, I’ve only started using cs3 and i can’t get this code to work:

stage.addEventListener(KeyboardEvent.KEY\_UP, touch);

function touch (e:KeyboardEvent):void  
{  
if (bullet.hitTestObject(enemy1))  
{  
nextFrame();  
}  
}

you control a bullet. if it touches enemy1, it will move to the next frame. But i cant seem to make this work. is there something wrong with the code? HELP! im a n0ob
