Animated Bitmap Class Update
I’ve updated the [intlink id="92" type="post"]AnimatedBitmap[/intlink] class so that it now uses an external timer object to trigger the animation. The advantage of this is that one timer can be used for many animated objects that use the same framerate. For this purpose a custom FrameRateTimer class has been added. This saves memory and CPU cycles when many animated objects are used.
I will eventually add an AnimatedDisplayObjectManager class later with that many animated objects can be controlled at once (e.g. stop/play all sprites at once) but this will probably be more intervened with the whole framework (as it might make use of custom data structures).
Thank you for the update.
Nice idea. Could use some tweaking though. At the moment it eats resources like crazy. Filling that little 448×320 stage with animated rings like your demo does it eats 14mb of memory. O_o
I hear ya! Flash Player is hard to tame when it comes to memory usage, especially when working with bitmaps. There’s still room for improvement though and I will get around it sometime.
Hi,
I’m new to OOP wioth actionscript 3 and although your animated bitmap class is EXACTLY what I need, I realize upon having downloaded it that I have no idea how to use it. Any docs or tutorials out there?
Where do I put the classes in order to have access to them from my document class? Do I need to set a new classpath to the folder they be in?
Thanks alot –
Marc
@marc, copy the ‘com’ folder from ‘src’ to where you store your third-party classes and then add a class path to it in your project and you can import it into any of your classes. Examples are included.