A really simple vector to bitmap example

When using the flash drawing api to create drawings on the stage, after many lines/shapes you will experience a significant slowing of the system. This is because flash has to draw each line every frame. Flash 8, provided a solution to this problem. You can now render your vector drawing to a bitmap.

Many of the examples of how to do this a quiet complex because they have a lot of pretty drawing code in them. The system is pretty easy once you understand it, so I’ve put together a really simple Actionscript 3 example. (note that AS2 is a bit different but the theory is the same)

Code comments provide explanation in the the source code.

Source: bitmapexample.as
Example: Bitmap_Example.swf

About Carly (Admin)

I'm a multimedia developer based in Brisbane. I work for an elearning firm and code my own projects in the wee small hours between eating, sleeping and working.
This entry was posted in My projects. Bookmark the permalink.

Leave a Reply