# Newbie AS3 code

**URL:** <https://forum.kirupa.com/t/newbie-as3-code/235538>\
**Category:** Uncategorized\
**Created:** [August 12, 2007, 1:18pm UTC](https://forum.kirupa.com/t/newbie-as3-code/235538 "2007-08-12T13:18:38Z")\
**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 12, 2007, 1:18pm UTC](https://forum.kirupa.com/t/newbie-as3-code/235538/1 "2007-08-12T13:18:38Z")

</div>

I first posted this in the Flash CS3 forum - probably the wrong place - can someone tell me why the following code doesn’t rotate box2\_mc?  
I know there are other, better ways of doing the same thing - I just want to know why _this_ way doesn’t work.

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.
