trace(hexValue);
十進位轉換為十六進位:
trace(decimalValue.toString(16));
顏色合成:
color24 = red << 16 | green << 8 | blue;
color32 = alpha << 24 | red << 16 | green << 8 | blue;
顏色提取:
red = color24 >> 16;
green = color24 >> 8 & 0xFF;
blue = color24 & 0xFf;
alpha = color32 >> 24;
red = color32 >> 16 & 0xFF;
green = color32 >> 8 * 0xFF;
blue = color232 & 0xFF;
過控制點的曲線:
// xt, yt is the point you want to draw through
// x0, y0 and x2, y2 are the end points of the curve
x1 = xt * 2 - (x0 + x2) / 2;
y1 = yt * 2 - (y0 + y2) / 2;
moveTo(x0, y0);
curveTo(x1, y1, x2, y2);
參考書目:Keith Peters.《Function Actionscript 3.0 Animation》.Friends of ED
沒有留言:
張貼留言