I have an AS3 bitmap image that I would like to skew like so:
I would only like to skew the bottom part of the image, and leave the top part alone. Based on my research that I've done so far, it looks like I'd want to use the Matrix3D class, but I'm not quite sure how to effectively implement it.
Thanks to an answer below, this article is an excellent resource to understand the Matrix3D class with a 3x3 matrix: http://www.senocular.com/flash/tutorials/transformmatrix/ However as awesome as that tutorial is, it does not provide the capability to skew the above image. What I'm looking for is a similar tutorial on how to use a 4x4 matrix. All I'd like to know is where to put the numbers in the matrix, and I should be able to figure out everything else.
Here's some example code on what I've got so for:
var tempLoader:Loader=new Loader();
var tempBitmap:Bitmap;
var fattenTheBottom:Number;
tempLoader.load(new URLRequest("image.png"));
tempLoader.contentLoaderInfo.addEventListener(Event.COMPLETE,castBitmap);
function castBitmap(e:Event):void
{
tempLoader.contentLoaderInfo.removeEventListener(Event.COMPLETE,castBitmap);
tempBitmap = Bitmap(tempLoader.content);
// Make the image into a trapezoid here using fattenTheBottom
addChild(tempBitmap);
}
Any advice would be wonderfully appreciated!