# Newbie AS3 code

**URL:** <https://forum.kirupa.com/t/newbie-as3-code/235441>\
**Category:** flash\
**Created:** [August 11, 2007, 12:26am UTC](https://forum.kirupa.com/t/newbie-as3-code/235441 "2007-08-11T00:26:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![flip](https://avatars.discourse-cdn.com/v4/letter/f/53a042/32.png) [@flip](https://forum.kirupa.com/u/flip)\
**Post date:** [August 11, 2007, 12:26am UTC](https://forum.kirupa.com/t/newbie-as3-code/235441/1 "2007-08-11T00:26:49Z")

</div>

G’day all,

and to show just how new to AS3 I am, can someone tell me why the following code doesn’t rotate box2\_mc?

2layers - 1 frame  
top layer - actions  
bottom layer - box2\_mc - instance of “box”

\*stage.addEventListener(Event.ENTER\_FRAME, flip);

function flip(event:Event):void {  
box2\_mc.rotation += 45;  
}

\*Thanks for your patience.
