EasyManua.ls Logo

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE - Page 1260

MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
1378 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
1260 ActionScript classes
trace("matrix_a: " + myArray[i].matrix_a);
trace("matrix_b: " + myArray[i].matrix_b);
trace("matrix_c: " + myArray[i].matrix_c);
trace("matrix_d: " + myArray[i].matrix_d);
trace("matrix_ty: " + myArray[i].matrix_tx);
trace("matrix_tx: " + myArray[i].matrix_ty);
trace(" ");
}
function decToHex(dec:Number) {
var hexString:String = "";
if (dec > 15) {
hexString = decToHex(Math.floor(dec / 16));
}
var hexDigit = dec - 16 * (Math.floor(dec / 16));
if (hexDigit > 9) {
hexDigit = String.fromCharCode(hexDigit + 55);
}
hexString = hexString + hexDigit;
return hexString;
}
This creates the following output:
indexInRun: 0
selected: false
font: Times New Roman
color: FF000000
height: 28.6
matrix_a: 0.0316612236983293
matrix_b: 0.0385940558426864
matrix_c: -0.0385940558426864
matrix_d: 0.0316612236983293
matrix_ty: 22.75
matrix_tx: 40.35
indexInRun: 0
selected: false
font: Times New Roman
color: 80000000
height: 28.6
matrix_a: 0.0316612236983293
matrix_b: 0.0385940558426864
matrix_c: -0.0385940558426864
matrix_d: 0.0316612236983293
matrix_ty: 49
matrix_tx: 45.5
This example uses a decToHex() method to convert the decimal value of the color property
to a hexidecimal value.

Table of Contents

Related product manuals