Skip to main content
Participant
April 3, 2009
Question

Help! Custom Class registration problem...

  • April 3, 2009
  • 1 reply
  • 310 views
Hi guys
I posted a question regarding how to make a ladybug move around the screen and I managed to make a class that loaded a ladybug png then using a timer moves the bug around the screen...
but I have a huge problem...this has been bugging me all day and cannot find a solution...
The ladybug moves around the screen but rotates towards the moving direction before moving. The problem is that the ladybug is rotating at 0,0 axis and not at the centre of the movieClip. Is there a way to offset the registration point so that the ladybug rotates centred?

Also I saw something about using "smooth" to smooth out the bitmap...is there a way to incorporate this here as well?

Please help my sanity is in stake...
Thank you
I've attached the codes...
This topic has been closed for replies.

1 reply

kglad
Community Expert
Community Expert
April 5, 2009

1.  add your ladybug to a parent sprite and offset its x and y by negative its width and negative its height.

2.  i don't think there is a smoothing property for the as3 loader so you'll need to create a bitmap and apply smoothing to it (after you use the bitmapdata's draw method to create a bitmapdata instance from your loader).