Flex 2 Example : Mandelbrot explorer & what's up BitmapData.lock() / .unLock()

I created this example somewhere during the beta phases of Flex 2, and found no reason to actually do something with it (like finishing it) anymore. But today there were some questions about the BitmapData.lock() features on the Flashcoders list, and I’d figured this might be a nice example. Originally intended as a testcase for building Flex components (I’ve come a long way with that, more on that later), this thing seemed the perfect thing to showcase the .lock method with.

Although most of the interface is not really functional yet (I’m intending on making it useable somewhere in the future), the .lock() checkbox is the thing where it’s all about here; uncheck it to make the mandelbrot drawing routine not to be preceded by al .lock() of the bitmap it’s drawing on (and closing it with an unlock again). If you don’t zoom in immediatly, and change the resolution to a very high one (Fraczilla or WS) hit draw, then uncheck and hit draw again, there should be a noticeable difference between the amount of MS it took to draw. If you zoom in further, the actual fractal calculations take alot more time then the drawing of the fractal, and the difference becomes marginal.

Still, if it takes about 200Ms longer to draw on my blazin’ fast duo core machine, the lock() feature has proven itself usefull, hasn’t it ? ;-)

You’ll need Flash Player 9.

This entry was posted in Flex. Bookmark the permalink.

3 Responses to Flex 2 Example : Mandelbrot explorer & what's up BitmapData.lock() / .unLock()

  1. felix says:

    Nice! Good demo of Flash 9′s speed.

  2. Martin says:

    Very interesting I would GUESS. for me it is just a black square.

    I got the flash 9 player, as I can see when rightclicking.

    I have hit draw, and I have clicked around in the black square and been patient.

    Is it a fault from your or my side?

    / martin

  3. Taurizio says:

    Plz, post source code.
    Thank you and have fun.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.