 	
 	@define "x",
 		get: -> @_matrix.x
-		set: (value) ->
-			@animateStop()
-			@_matrix.x = value
-			@_matrix = @_matrix
-			@emit "change:x"
-			@emit "change:frame"
+		set: (value) -> @_setMatrixValue "x", value
 	
 	@define "y",
 		get: -> @_matrix.y
-		set: (value) ->
-			@animateStop()
-			@_matrix.y = value
-			@_matrix = @_matrix
-			@emit "change:y"
-			@emit "change:frame"
+		set: (value) -> @_setMatrixValue "y", value
 
 	@define "z",
 		get: -> @_matrix.z
-		set: (value) ->
-			@animateStop()
-			@_matrix.z = value
-			@_matrix = @_matrix
-			@emit "change:z"
-			@emit "change:frame"
+		set: (value) -> @_setMatrixValue "z", value
 
 	#############################################################################
 	## Scale
 	
 	@define "scale",
 		get: -> @_matrix.scale
-		set: (value) ->
-			@animateStop()
-			@_matrix.scale = value
-			@_matrix = @_matrix
-
-			@emit "change:scale"
+		set: (value) -> @_setMatrixValue "scale", value
 
 	@define "scaleX",
 		get: -> @_matrix.scaleX
-		set: (value) ->
-			@animateStop()
-			@_matrix.scaleX = value
-			@_matrix = @_matrix
-
-			@emit "change:scaleX"
-			@emit "change:scale"
+		set: (value) -> @_setMatrixValue "scaleX", value
 	
 	@define "scaleY",
 		get: -> @_matrix.scaleY
-		set: (value) ->
-			@animateStop()
-			@_matrix.scaleY = value
-			@_matrix = @_matrix
-
-			@emit "change:scaleY"
-			@emit "change:scale"
+		set: (value) -> @_setMatrixValue "scaleY", value
 	
 	@define "scaleZ",
 		get: -> @_matrix.scaleZ
-		set: (value) ->
-			@animateStop()
-			@_matrix.scaleZ = value
-			@_matrix = @_matrix
-
-			@emit "change:scaleZ"
-			@emit "change:scale"
-
-
-	#############################################################################
-	## Rotate
-
-	@define "rotate",
-		get: -> @_matrix.rotate
-		set: (value) ->
-			@animateStop()
-			@_matrix.rotate = value
-			@_matrix = @_matrix
-
-			@emit "change:rotate"
-
-	@define "rotateX",
-		get: -> @_matrix.rotateX
-		set: (value) ->
-			@animateStop()
-			@_matrix.rotateX = value
-			@_matrix = @_matrix
-			
-			@emit "change:rotateX"
-			@emit "change:rotate"
-	
-	@define "rotateY",
-		get: -> @_matrix.rotateY
-		set: (value) ->
-			@animateStop()
-			@_matrix.rotateY = value
-			@_matrix = @_matrix
-
-			@emit "change:rotateX"
-			@emit "change:rotate"
-
-	@define "rotateZ",
-		get: -> @_matrix.rotateZ
-		set: (value) ->
-			@animateStop()
-			@_matrix.rotateZ = value
-			@_matrix = @_matrix
-
-			@emit "change:rotateZ"
-			@emit "change:rotate"
+		set: (value) -> @_setMatrixValue "scaleZ", value
+
+
+	#############################################################################
+	## Rotation
+
+	@define "rotation",
+		get: -> @_matrix.rotation
+		set: (value) ->  @_setMatrixValue "rotation", value
+
+	@define "rotationX",
+		get: -> @_matrix.rotationX
+		set: (value) -> @_setMatrixValue "rotationX", value
+	
+	@define "rotationY",
+		get: -> @_matrix.rotationY
+		set: (value) -> @_setMatrixValue "rotationY", value
+
+	@define "rotationZ",
+		get: -> @_matrix.rotationZ
+		set: (value) -> @_setMatrixValue "rotationZ", value
 
 
 	#############################################################################

	screenFrame: ->
		# Get this views absolute frame on the screen
		utils.convertPoint @frame, @, null
	
	
	contentFrame: ->
		# Get the total size of all subviews

		indexB = view.index
		view.index = indexA
		@index = indexB
	
	bringToFront: ->
		siblingIndexes = _.pluck @siblingViews, "index"
		@index = (utils.max(siblingIndexes) + 1) or 0
	
	sendToBack: ->
		siblingIndexes = _.pluck @siblingViews, "index"
		@index = (utils.min(siblingIndexes) - 1) or 0

	#############################################################################
	## Animation
