Home > Dev > Animated Bitmap Class Update

Animated Bitmap Class Update

September 28th, 2007 Leave a comment Go to comments

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).

Categories: Dev Tags:
  1. March 27th, 2008 at 12:59 | #1

    Thank you for the update.

  2. lith
    May 15th, 2008 at 11:32 | #2

    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

  3. May 15th, 2008 at 13:53 | #3

    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.

  4. marc
    November 6th, 2008 at 11:52 | #4

    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

  5. November 6th, 2008 at 12:43 | #5

    @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.

  1. August 29th, 2014 at 18:51 | #1
  2. September 15th, 2014 at 12:55 | #2
You must be logged in to post a comment.