cacheAsBitmap hell

Last week I spent a whole day trying to solve an issue in Phoenix due to a strange problem which comes up suddenly after some code changes.
The problem was that now using the transformation tool the bounds of the selected bitmap were not detected correctly and the tool itself didn’t work.
So I spent a lot of time in checking out all the recent code changes ( and they were a lot! ) to find out the possible cause…
Anyway, I was lucky to figure out the problem by accident and the problem was cacheAsBitmap!

The problem with the tool is because in order to find the correct bounds of any element on the stage it use the .concatenatedMatrix property of the element itself ( which represents the combined transformation matrixes of the display object and all of its parent objects, back to the root level ).
BUT if any of its parent display object ( not the root itself ) has the cacheAsBitmap property set to true then the concatenatedMatrix returns a wrong value!

I put a real simple flash example of what I mean. Just click on any of the 2 colored objects to activate the transform tool, then click on the “cache” button and click again on those objects to see the difference.

[kml_flashembed publishmethod=”static” fversion=”10.0.22″ movie=”http://blog.sephiroth.it/wp-content/uploads/2008/03/cacheasbitmap_hell.swf” width=”450″ height=”450″ targetclass=”flashmovie” bgColor=”#ffffcc”]

Get Adobe Flash player

[/kml_flashembed]

P.S. I’ve reported the bug in the flash player bugbase, if anyone is interested in watch or vote for it.

Get your Aviary invitation!

One of the most ambitious projects I’ve ever worked on is finally coming out. It’s really gratifying when looking at what people is able to do using our software, for example meowza, one of my favourite artists.. Damn, I wrote the software but I just can draw a couple of circles and place a text on the canvas, nothing else 🙂 I would never have imagined that someone could do so awesome images.

Now Aviary finally opens to beta user using invitations. So, if you want to participate to the beta and try out Phoenix or Peacock ( the tool created by Mario ) just send me an email, I can give out some invitations.
We’re also planning to add some new cool features to Phoenix in the next days!
Recently Mario has also posted on his site a nice video on both Peacock and Phoenix in action, watch it here.

P.S. We’re hiring! If you’re a talented developer write me an email!