This content has been marked as final. Show 3 replies
I presume in your code its really:
rotation and scaling are much more CPU intensive than translating, particularly for an object that contains a bitmap (and particularly for larger bitmaps). If you are running the setInterval code at 10 msec intervals like that, then - in theory - you are requesting potential updates at 100 frames per second. It seems unreasonably high and in practice I don't think it will achieve anything like that.
ok thanks for that!
right gwd! the interval rate is far to high, it's generally not a good idea to run intervals faster than the current frame rate, when it effects graphic elements, even when calling updateAfterEvent, which will force the screen to redraw.
Additionally, Prosaunoja you may be able to achieve this effect by a simpler structure without the looping interval, by using the Tween class, as below: