# Wont work using AS3, but does using AS2!Please help!

**URL:** <https://forum.kirupa.com/t/wont-work-using-as3-but-does-using-as2-please-help/256385>\
**Category:** Uncategorized\
**Created:** [April 2, 2008, 5:13pm UTC](https://forum.kirupa.com/t/wont-work-using-as3-but-does-using-as2-please-help/256385 "2008-04-02T17:13:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scank](https://avatars.discourse-cdn.com/v4/letter/s/dfb087/32.png) [@Scank](https://forum.kirupa.com/u/Scank)\
**Post date:** [April 2, 2008, 5:13pm UTC](https://forum.kirupa.com/t/wont-work-using-as3-but-does-using-as2-please-help/256385/1 "2008-04-02T17:13:08Z")

</div>

Hi, Im following a simple tutorial for creating a spacegame, simple game where a space ship shoots bullets and hits objects, using keyboard input… I have the following script, which makes the object move around the stage…

this.onEnterFrame = function()  
{   
if (Key.isDown(Key.RIGHT))   
{   
Ship.\_x += 10;   
} else if (Key.isDown(Key.LEFT))   
{   
Ship.\_x -= 10;   
} else if (Key.isDown(Key.UP))   
{   
Ship.\_y -= 10;   
} else if (Key.isDown(Key.DOWN))   
{   
Ship.\_y += 10;   
}  
}

Now Im doing this for a University assignment, and a reqwuirement is it needs to use AS3! Well when i run the application in AS3 it does not recognise the UP DOWN RIGHT and LEFT values…however, it does run fine using AS2…is there anyway i can incorporate this script into AS3? Thanks.
