Scale (Matrix.scale Method); Tostring (Matrix.tostring Method) - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

scale (Matrix.scale method)

public scale(sx:Number, sy:Number) : Void
Modifies a matrix so that its effect, when applied, is to resize an image. In the resized image,
the location of each pixel on the x axis is multiplied by
.
sy
The
method alters the
scale()
this is shown as follows:
Availability: ActionScript 1.0; Flash Player 8
Parameters
- A multiplier used to scale the object along the x axis.
sx:Number
- A multiplier used to scale the object along the y axis.
sy:Number
Example
The following example uses the
horizontally and a factor of four vertically.
import flash.geom.Matrix;
var myMatrix:Matrix = new Matrix(2, 0, 0, 2, 100, 100);
trace(myMatrix.toString()); // (a=2, b=0, c=0, d=2, tx=100, ty=100)
myMatrix.scale(3, 4);
trace(myMatrix.toString()); // (a=6, b=0, c=0, d=8, tx=300, ty=400)

toString (Matrix.toString method)

public toString() : String
Returns a text value listing the properties of the Matrix object.
Availability: ActionScript 1.0; Flash Player 8
Returns
- A string containing the values of the properties of the Matrix object:
String
and
.
ty
780
ActionScript classes
and
properties of the matrix object. In matrix notation
a
d
method to scale
scale()
; and on the y axis it is multiplied by
sx
by a factor of three
myMatrix
,
,
,
,
,
a
b
c
d
tx

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF