03.05.2013 Views

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

ActionScript 2.0 Language Reference - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

}<br />

if (dec > 15) {<br />

hexString = decToHex(Math.floor(dec / 16));<br />

}<br />

var hexDigit = dec - 16 * (Math.floor(dec / 16));<br />

if (hexDigit > 9) {<br />

hexDigit = String.fromCharCode(hexDigit + 55);<br />

}<br />

hexString = hexString + hexDigit;<br />

return hexString;<br />

This creates the following output:<br />

indexInRun: 0<br />

selected: false<br />

font: Times New Roman<br />

color: FF000000<br />

height: 28.6<br />

matrix_a: 0.0316612236983293<br />

matrix_b: 0.0385940558426864<br />

matrix_c: -0.0385940558426864<br />

matrix_d: 0.0316612236983293<br />

matrix_ty: 22.75<br />

matrix_tx: 40.35<br />

indexInRun: 0<br />

selected: false<br />

font: Times New Roman<br />

color: 80000000<br />

height: 28.6<br />

matrix_a: 0.0316612236983293<br />

matrix_b: 0.0385940558426864<br />

matrix_c: -0.0385940558426864<br />

matrix_d: 0.0316612236983293<br />

matrix_ty: 49<br />

matrix_tx: 45.5<br />

This example uses a decToHex() method to convert the decimal value of the color property<br />

to a hexadecimal value.<br />

See also<br />

Matrix (flash.geom.Matrix)<br />

TextSnapshot 1281

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!