Return to Snippet

Revision: 13961
at May 14, 2009 10:04 by sidneydekoning


Initial Code
function flipHorizontal(dsp:DisplayObject):void {
	var matrix:Matrix = dsp.transform.matrix;
	matrix.a = -1;
	matrix.tx = dsp.width + dsp.x;
	dsp.transform.matrix = matrix;
}

function flipVertical(dsp:DisplayObject):void {
	var matrix:Matrix = dsp.transform.matrix;
	matrix.d = -1;
	matrix.ty = dsp.height + dsp.y;
	dsp.transform.matrix = matrix;
}

Initial URL

                                

Initial Description

                                

Initial Title
Flipping objects with a Matrix

Initial Tags

                                

Initial Language
ActionScript 3