# Newbies first as3 try

**URL:** <https://forum.kirupa.com/t/newbies-first-as3-try/329849>\
**Category:** Uncategorized\
**Created:** [October 24, 2012, 6:02pm UTC](https://forum.kirupa.com/t/newbies-first-as3-try/329849 "2012-10-24T18:02:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Claid](https://avatars.discourse-cdn.com/v4/letter/c/d26b3c/32.png) [@Claid](https://forum.kirupa.com/u/Claid)\
**Post date:** [October 24, 2012, 6:02pm UTC](https://forum.kirupa.com/t/newbies-first-as3-try/329849/1 "2012-10-24T18:02:39Z")

</div>

//- on stage i have a textbox called localstat\_vtext

stage.addEventListener(KeyboardEvent.KEY\_DOWN, fl\_changeSlide);  
localstat\_vtext.text = “000”  
int my\_mc\_rotation = 0  
int my\_mc\_speed = 0  
function fl\_changeSlide(evt:KeyboardEvent):void  
{  
if(evt.keyCode == 37) // LEFT  
{  
my\_mc\_rotation -= 1  
}  
else if (evt.keyCode == 39 ) // RIGHT OR SPACE  
{  
my\_mc\_rotation += 1  
}  
else if (evt.keyCode == 38 ) // RIGHT OR SPACE  
{  
my\_mc\_speed -= 1  
}  
else if (evt.keyCode == 40 ) // RIGHT OR SPACE  
{  
my\_mc\_speed += 1  
}

//stats update  
localstat\_vtext.text +=“rotation = [”+my\_mc\_rotation+"] degrees"  
localstat\_vtext.text +=“speed = [”+my\_mc\_rotation+"] micrometers/hour"  
}  
stop();
