| 1 |
package { |
|---|
| 2 |
|
|---|
| 3 |
import flash.display.Sprite; |
|---|
| 4 |
|
|---|
| 5 |
import net.saqoosha.colorlog.ColorLog; |
|---|
| 6 |
import net.saqoosha.colorlog.SGR; |
|---|
| 7 |
|
|---|
| 8 |
[SWF(width=100, height=100, backgroundColor=0x0, frameRate=1)] |
|---|
| 9 |
|
|---|
| 10 |
public class TestColorLog2 extends Sprite { |
|---|
| 11 |
|
|---|
| 12 |
private static const COLORS:Array = [ |
|---|
| 13 |
SGR.BG_NORMAL_BLACK, |
|---|
| 14 |
SGR.BG_NORMAL_BLUE, |
|---|
| 15 |
SGR.BG_NORMAL_CYAN, |
|---|
| 16 |
SGR.BG_NORMAL_GREEN, |
|---|
| 17 |
SGR.BG_NORMAL_MAGENTA, |
|---|
| 18 |
SGR.BG_NORMAL_RED, |
|---|
| 19 |
SGR.BG_NORMAL_WHITE, |
|---|
| 20 |
SGR.BG_NORMAL_YELLOW, |
|---|
| 21 |
SGR.BG_BRIGHT_BLACK, |
|---|
| 22 |
SGR.BG_BRIGHT_BLUE, |
|---|
| 23 |
SGR.BG_BRIGHT_CYAN, |
|---|
| 24 |
SGR.BG_BRIGHT_GREEN, |
|---|
| 25 |
SGR.BG_BRIGHT_MAGENTA, |
|---|
| 26 |
SGR.BG_BRIGHT_RED, |
|---|
| 27 |
SGR.BG_BRIGHT_WHITE, |
|---|
| 28 |
SGR.BG_BRIGHT_YELLOW |
|---|
| 29 |
]; |
|---|
| 30 |
|
|---|
| 31 |
public function TestColorLog2() { |
|---|
| 32 |
var i:int = 0; |
|---|
| 33 |
for (var y:int = 0; y < 25; y++) { |
|---|
| 34 |
for (var x:int = 0; x < 50; x++) { |
|---|
| 35 |
ColorLog.setColor(COLORS[(x + y*2) % COLORS.length]); |
|---|
| 36 |
ColorLog.out(' '); |
|---|
| 37 |
} |
|---|
| 38 |
ColorLog.flush(); |
|---|
| 39 |
} |
|---|
| 40 |
} |
|---|
| 41 |
} |
|---|
| 42 |
} |
|---|