Hexadecimal Color

Code Actionscript 2.0

Frame action

createEmptyMovieClip("drawing", 1);
drawing.lineStyle(3, 0x66FF33, 100);
drawing.beginFill(0x6699EE, 100);
drawing.moveTo(50, 30);
drawing.lineTo(150, 40);
drawing.lineTo(110, 150);
drawing.lineTo(30, 90);
drawing.endFill();

Code Actionscript 3.0

var drawing:MovieClip = new MovieClip(); drawing.graphics.lineStyle(3, 0x66FF33, 100); drawing.graphics.beginFill(0x6699EE, 100); drawing.graphics.moveTo(50, 30); drawing.graphics.lineTo(150, 40); drawing.graphics.lineTo(110, 150); drawing.graphics.lineTo(30, 90); drawing.graphics.endFill(); this.addChild(drawing);

Description

Hexadecimal color codes always begin with the digits 0x, followed by two hex-digits for each of the three components of color, red, green and blue. The color of the green line (0x66FF33) is given by the red component 66 (decimal 6*16 + 6 = 102), the green component FF (decimal 15*15 + 15 = 255) and the blue component 33 (decimal 3*16 + 3 = 51).

related to: Decimal Color

Download

Right click: Flashfile AS 2.0 | Flashfile AS 3.0 | SWF-File


Share