Frame 1
layer = 0;
bLeft = 8;
bRight = 424;
bTop = 40;
bBottom = 448;
_root.onMouseDown = function () {
if ((((_xmouse > bLeft) && (_xmouse < bRight)) && (_ymouse > bTop)) && (_ymouse < bBottom)) {
layer++;
_root.drawingPlane.createEmptyMovieClip("layer" + layer, layer);
with (_root.drawingPlane["layer" + layer]) {
lineStyle(_root.actions.thickness, _root.actions.HEXcolor, _root.actions.cA);
if (_root.actions.penmode == "draw") {
moveTo(_root.actions.lastX, _root.actions.lastY);
}
}
_root.actions.initX = _root._xmouse;
_root.actions.initY = _root._ymouse;
_root.actions.pendown = true;
}
};
_root.onMouseUp = function () {
_root.actions.pendown = false;
};
stop();
Instance of Symbol 12 MovieClip "actions" in Frame 1
onClipEvent (load) {
function updateGradBar() {
with (_root.gradBar) {
clear();
gColors = [HEXcolorGrad1, HEXcolorGrad2];
gAlphas = [g1A, g2A];
gRatios = [0, 255];
gMatrix = {matrixType:"box", x:8, y:0, w:104, h:16, r:0};
beginGradientFill("linear", gColors, gAlphas, gRatios, gMatrix);
lineStyle(0, 0, 0);
moveTo(8, 0);
lineTo(112, 0);
lineTo(112, 16);
lineTo(8, 16);
lineTo(8, 0);
}
}
function setSliderPos(which) {
_root.sliderR._x = 512 + ((eval (which + "R") * 80) / 255);
_root.sliderG._x = 512 + ((eval (which + "G") * 80) / 255);
_root.sliderB._x = 512 + ((eval (which + "B") * 80) / 255);
_root.sliderA._x = 512 + (eval (which + "A") * 0.8);
}
pendown = false;
penmode = "draw";
thickness = 2;
cR = 0;
cG = 0;
cB = 0;
cA = 100;
fR = 0;
fG = 0;
fB = 0;
fA = 100;
g1R = 127;
g1G = 127;
g1B = 127;
g1A = 100;
g2R = 127;
g2G = 127;
g2B = 127;
g2A = 100;
fillEdit = "f";
fillType = "solid";
i = 1;
polypoints = 50;
var HEXcode = "0x000000";
myColorLine = new Color(_root.cBlock);
myColorFill = new Color(_root.fBlock);
myColorGrad1 = new Color(_root.gradMarker1);
myColorGrad2 = new Color(_root.gradMarker2);
nextArray = new Array();
}
onClipEvent (enterFrame) {
lastX = x;
lastY = y;
X = _root._xmouse;
Y = _root._ymouse;
if (pendown && (penmode == "draw")) {
with (_root.drawingPlane["layer" + _root.layer]) {
lineStyle(thickness, HEXcolorLine, cA);
lineTo(X, Y);
}
}
if (pendown && (((((penmode == "line") || (penmode == "curve")) || (penmode == "box")) || (penmode == "circle")) || (penmode == "polygon"))) {
_root.drawingPlane[(("layer" + _root.layer) + "_") + (i - 1)].removeMovieClip();
_root.drawingPlane.createEmptyMovieClip((("layer" + _root.layer) + "_") + i, _root.layer);
with (_root.drawingPlane[(("layer" + _root.layer) + "_") + i]) {
if (thickness > 0) {
lineStyle(thickness, HEXcolorLine, cA);
} else {
lineStyle(0, 0, 0);
}
if (((penmode == "box") || (penmode == "circle")) || (penmode == "polygon")) {
if (fillType == "solid") {
beginFill(HEXcolorFill, fA);
}
if ((fillType == "linear") || (fillType == "radial")) {
gColors = [HEXcolorGrad1, HEXcolorGrad2];
gAlphas = [g1A, g2A];
gRatios = [0, 255];
gMatrix = {matrixType:"box", x:initX, y:initY, w:X - initX, h:Y - initY, r:0};
beginGradientFill(fillType, gColors, gAlphas, gRatios, gMatrix);
}
}
if (penmode == "line") {
moveTo(initX, initY);
lineTo(X, Y);
}
if (penmode == "curve") {
moveTo(initX, initY);
curveTo(X, initY, X, Y);
}
if (penmode == "box") {
moveTo(initX, initY);
lineTo(X, initY);
lineTo(X, Y);
lineTo(initX, Y);
lineTo(initX, initY);
}
if (penmode == "circle") {
difX = X - initX;
difY = Y - initY;
midX = (X + initX) / 2;
midY = (Y + initY) / 2;
offX = difX * 0.03;
offY = difY * 0.03;
moveTo(midX, initY);
curveTo(X - offX, initY + offY, X, midY);
curveTo(X - offX, Y - offY, midX, Y);
curveTo(initX + offX, Y - offY, initX, midY);
curveTo(initX + offX, initY + offY, midX, initY);
}
if (penmode == "polygon") {
midX = (X + initX) / 2;
midY = (Y + initY) / 2;
difX = X - initX;
difY = Y - initY;
moveTo(midX, initY);
s = 0;
while (s < (polypoints + 1)) {
nextX = ((Math.sin(((s * (360 / polypoints)) * Math.PI) / 180) + 1) * difX) / 2;
nextY = (((-Math.cos(((s * (360 / polypoints)) * Math.PI) / 180)) + 1) * difY) / 2;
lineTo(initX + nextX, initY + nextY);
s++;
}
}
endFill();
}
i++;
if (i > 10) {
i = i - 10;
}
}
HEXcolorLine = ((cR << 16) | (cG << 8)) | cB;
HEXcolorFill = ((eval (fillEdit + "R") << 16) | (eval (fillEdit + "G") << 8)) | eval (fillEdit + "B");
HEXcolorGrad1 = ((g1R << 16) | (g1G << 8)) | g1B;
HEXcolorGrad2 = ((g2R << 16) | (g2G << 8)) | g2B;
if (fillType == "none") {
myColorFill.setRGB(16711680);
_root.fBlock.gotoAndStop("nofill");
} else {
myColorFill.setRGB(HEXcolorFill);
_root.fBlock.gotoAndStop("fill");
}
if (thickness > 0) {
myColorLine.setRGB(HEXcolorLine);
_root.cBlock.gotoAndStop("fill");
} else {
myColorLine.setRGB(16711680);
_root.cBlock.gotoAndStop("nofill");
}
myColorGrad1.setRGB(HEXcolorGrad1);
myColorGrad2.setRGB(HEXcolorGrad2);
_root.cBlock._alpha = cA;
_root.fBlock._alpha = fA;
_root.gradMarker1._alpha = g1A;
_root.gradMarker2._alpha = g2A;
HEXcodeLine = "";
HEXcodeLine = HEXcodeLine + ((cR < 16) ? ("0" + cR.toString(16)) : (cR.toString(16)));
HEXcodeLine = HEXcodeLine + ((cG < 16) ? ("0" + cG.toString(16)) : (cG.toString(16)));
HEXcodeLine = HEXcodeLine + ((cB < 16) ? ("0" + cB.toString(16)) : (cB.toString(16)));
HEXcodeFill = "";
HEXcodeFill = HEXcodeFill + ((fR < 16) ? ("0" + fR.toString(16)) : (fR.toString(16)));
HEXcodeFill = HEXcodeFill + ((fG < 16) ? ("0" + fG.toString(16)) : (fG.toString(16)));
HEXcodeFill = HEXcodeFill + ((fB < 16) ? ("0" + fB.toString(16)) : (fB.toString(16)));
fillR = eval (fillEdit + "R");
fillG = eval (fillEdit + "G");
fillB = eval (fillEdit + "B");
fillA = eval (fillEdit + "A");
updateGradBar();
}
Instance of Symbol 17 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.actions.thickness = Math.floor(((_x - 512) * 20.999) / 80);
}
Instance of Symbol 18 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.actions.cR = Math.floor(((_x - 512) * 255.999) / 80);
}
Instance of Symbol 18 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.actions.cG = Math.floor(((_x - 512) * 255.999) / 80);
}
Instance of Symbol 18 MovieClip in Frame 1
onClipEvent (enterFrame) {
_root.actions.cB = Math.floor(((_x - 512) * 255.999) / 80);
}
Instance of Symbol 18 MovieClip "sliderR" in Frame 1
onClipEvent (enterFrame) {
_root.actions[_root.actions.fillEdit + "R"] = Math.floor(((_x - 512) * 255.999) / 80);
}
Instance of Symbol 18 MovieClip "sliderG" in Frame 1
onClipEvent (enterFrame) {
_root.actions[_root.actions.fillEdit + "G"] = Math.floor(((_x - 512) * 255.999) / 80);
}
Instance of Symbol 18 MovieClip "sliderB" in Frame 1
onClipEvent (enterFrame) {
_root.actions[_root.actions.fillEdit + "B"] = Math.floor(((_x - 512) * 255.999) / 80);
}
Symbol 16 Button
on (press) {
startDrag (this, true, 512, _y, 592, _y);
}
on (release, releaseOutside) {
stopDrag();
}
Symbol 22 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 2
stop();
Symbol 27 Button
on (release) {
_root.actions.penmode = "draw";
}
Symbol 31 Button
on (release) {
_root.actions.penmode = "line";
}
Symbol 35 Button
on (release) {
_root.actions.penmode = "box";
}
Symbol 39 Button
on (release) {
_root.actions.penmode = "circle";
}
Symbol 47 Button
on (press) {
_root.actions.setting = true;
}
on (release) {
i = _root.layer;
while (i > 0) {
_root.drawingPlane["layer" + i].clear();
_root.drawingPlane["layer" + i].removeMovieClip();
j = 0;
while (j < 11) {
_root.drawingPlane[(("layer" + i) + "_") + j].clear();
_root.drawingPlane[(("layer" + i) + "_") + j].removeMovieClip();
j++;
}
i--;
}
_root.layer = 0;
}
on (release, releaseOutside) {
_root.actions.setting = false;
}
Symbol 49 Button
on (press) {
_root.actions.setting = true;
}
on (release) {
if (_root.layer > 0) {
_root.drawingPlane["layer" + _root.layer].clear();
_root.drawingPlane["layer" + _root.layer].removeMovieClip();
i = 0;
while (i < 11) {
_root.drawingPlane[(("layer" + _root.layer) + "_") + i].clear();
_root.drawingPlane[(("layer" + _root.layer) + "_") + i].removeMovieClip();
i++;
}
_root.layer--;
}
}
on (release, releaseOutside) {
_root.actions.setting = false;
}
Symbol 55 Button
on (release) {
printAsBitmapNum (1, "bmax");
}