Yet another weird actionscript problem that’s been bothering me for some time. I’m trying to make a BitmapData snapshot of a Flex Component and then transform it with a Matrix. Quite simple you would say, this is how you would do it:
1
2
3
4
5
var flippedBmd:BitmapData = new BitmapData(myUIComponent.width, myUIComponent.height, true, 0xFFCC00);
var flipMatrix:Matrix = new Matrix();
flipMatrix.scale(-1, 1);
flipMatrix.translate(myUIComponent.width, 0);
flippedBmd.draw(myUIComponent, [...]
While most 3D coordinate systems are right handed, Papervision3D and Away3D are left handed, like this:
So every axis points into the positive direction and that’s what puzzled me for about two months while using Away3D; why do my 3D objects appear on the left side of the 0,0,0 position when I create them, while they [...]
There’s a project page of this component now, check it here, it’s open source!
I’ve been fiddling around with 3d engines in Flash for about a year now, but never used it in Flex before, so I decided to try to build an iTunes coverflow component in Flex. This was what i came up with:
Not really [...]
This is a problem i stumbled upon while trying to add a Sprite or MovieClip (or any DisplayObject) with actionscript to my DisplayList in Flex. I wanted to add a View3D (which is an extended Sprite) to my DisplayList in Flex. This just didn’t work because the Container Class overrides the addChild method:
1
2
var canvas:Canvas = [...]