Frame 2
function copyToBitmap(mc, bmp) {
var _local5 = new Object({x:0, y:0});
mc.localToGlobal(_local5);
var _local4 = new flash.geom.Matrix();
_local4.translate(_local5.x, _local5.y);
var _local8 = new flash.geom.Matrix();
_local4.concat(_local8);
var _local7 = new flash.geom.ColorTransform(0, 0, 1, 1, 0, 0, 0, 0);
var _local6 = "normal";
var _local9 = new flash.geom.Rectangle(0, 0, 550, 400);
var _local10 = true;
var _local1 = new Array();
var _local2 = 1;
_local1 = _local1.concat([_local2, _local2, _local2, 0, 0]);
_local1 = _local1.concat([_local2, _local2, _local2, 0, 0]);
_local1 = _local1.concat([_local2, _local2, _local2, 0, 0]);
_local1 = _local1.concat([0, 0, 0, 0.75, 0]);
bmp.draw(mc, _local4, _local7, _local6, _local9, _local10);
bmp.applyFilter(bmp, bmp.rectangle, new flash.geom.Point(0, 0), new flash.filters.BlurFilter(4, 4, 1));
bmp.applyFilter(bmp, bmp.rectangle, new flash.geom.Point(0, 0), new flash.filters.ColorMatrixFilter(_local1));
}
var bmpData = (new flash.display.BitmapData(550, 400, true, 11154244));
mcBmp.attachBitmap(bmpData, 2, "auto", true);
this.createEmptyMovieClip("maska", this.getNextHighestDepth());
maska.beginFill(16711680, 100);
maska.lineTo(Stage.width, 0);
maska.lineTo(Stage.width, Stage.height);
maska.lineTo(0, Stage.height);
maska.lineTo(0, 0);
maska.endFill();
drawSpiral = function (mc, center, radius_inc, ang, ang_inc, itterations, line_width, col, alpha) {
var _local3 = 0;
mc.lineStyle(line_width, col, alpha);
mc.moveTo(center.x, center.y);
var _local2 = 0;
while (_local2 < itterations) {
var _local1 = flash.geom.Point.polar(_local3, ang);
_local1 = _local1.add(center);
mc.lineTo(_local1.x, _local1.y);
_local3 = _local3 + radius_inc;
ang = ang + ang_inc;
_local2++;
}
};
generateSpiral = function () {
var _local4 = _root.mcSpiralContainer.mcSpiral._rotation;
if (_local4 == undefined) {
_local4 = _root.rot_inc;
}
_root.mcSpiralContainer.mcSpiral.removeMovieClip();
var _local3 = _root.mcSpiralContainer.createEmptyMovieClip("mcSpiral", _root.mcSpiralContainer.getNextHighestDepth());
_local3.setMask(_root.maska);
drawSpiral(_local3, new flash.geom.Point(0, 0), _root.radius_inc, 0, _root.ang_inc, _root.itterations, 4, 0, 100);
drawSpiral(_local3, new flash.geom.Point(0, 0), _root.radius_inc, Math.PI, _root.ang_inc, _root.itterations, 4, 0, 100);
_local3.rot = (_local3._rotation = _local4);
_local3.rot_inc = _root.rot_inc;
_local3.onEnterFrame = function () {
this.rot = this.rot + this.rot_inc;
this._rotation = Math.round(this.rot);
copyToBitmap(this._parent, bmpData);
};
};
sbRadius.Init(0.02, 10, 2.1, function () {
_root.radius_inc = sbRadius.Value;
_root.generateSpiral();
});
_root.radius_inc = sbRadius.Value;
sbAngle.Init(0.02, 1.2, 0.15, function () {
_root.ang_inc = sbAngle.Value;
_root.generateSpiral();
});
_root.ang_inc = sbAngle.Value;
sbRotation.Init(-10, 10, -3.3, function () {
_root.rot_inc = sbRotation.Value;
_root.generateSpiral();
});
_root.rot_inc = sbRotation.Value;
sbItterations.Init(10, 250, 180, function () {
_root.itterations = sbItterations.Value;
_root.generateSpiral();
});
_root.itterations = sbItterations.Value;
generateSpiral();
stop();
Symbol 5 MovieClip Frame 8
stop();
Symbol 6 MovieClip Frame 7
stop();
Symbol 7 Button
on (press) {
startDrag (this, false, 0, 0, 100, 0);
_parent.dragStart();
}
on (release, releaseOutside) {
this.stopDrag();
_parent.dragStop();
}
Symbol 9 MovieClip Frame 1
function Recalc() {
Value = Slider._x / 100;
Value = (Value * (maxValue - minValue)) + minValue;
DoStuff();
return(Value);
}
function Init(min, max, val, func) {
DoStuff = func;
minValue = min;
maxValue = max;
Value = val;
Slider._x = ((val - min) / (max - min)) * 100;
}
function dragStart() {
delete onEnterFrame;
this.onEnterFrame = Recalc;
}
function dragStop() {
delete onEnterFrame;
Recalc();
}
function DoStuff() {
}
var Value = 0;
var maxValue = 100;
var minValue = 0;