1 Replies - 3906 Views - Last Post: 23 October 2013 - 01:41 PM

#1 Eruthien  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 01-October 13

I'm new to AS3, help with image rotation

Posted 23 October 2013 - 12:48 PM

Hi guys, I just started learning AS3 and I'm having trouble rotating the image.What I want to happed is the image uses a motion tween to go up into the middle of the screen(I've already done the motion tween) while rotating 5 degres every frame. How would I do this in AS3, it needs to be done in AS3 because its for a IT project.

I was playing around with it earlier and I came up with this

addEventListener(Event.ENTER_FRAME,rotate);

function rotate{
image.rotation += 5
}



This code is very probably wrong so please do correct me and tell me how it should be done.

Thanks in advance.

Is This A Good Question/Topic? 0
  • +

Replies To: I'm new to AS3, help with image rotation

#2 Eruthien  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 24
  • Joined: 01-October 13

Re: I'm new to AS3, help with image rotation

Posted 23 October 2013 - 01:41 PM

Ok I go it to work now however I have another question. How do I make the spinning object fade out? I tried decreasing the alpha level every frame but it didn't work, is there anything I have to do in script to do it?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1