Frame 1
hsize = 700;
vsize = 700;
masktype = 0;
purchaseurl = "http://www.goztun.com/products/kaleidoflash?from=demo";
unregtext = "Unregistered of Kaleido Flash\nGozTun.com";
registered = true;
rotate1 = true;
rotate2 = true;
rotate3 = true;
flip = true;
singleview = false;
slices = 16;
nudge = 0.009;
rotspeed1 = 0.003;
rotspeed2 = -0.007;
rotspeed3 = -0.005;
sclfact = 0;
rot = 0;
r = 0;
r2 = 0;
sh1 = 0;
sh2 = 0;
scl = 1;
function onEnterFrame() {
if (rotate1) {
r = r + rotspeed1;
}
if (rotate2) {
r2 = r2 - rotspeed2;
}
if (rotate3) {
rot = rot + rotspeed3;
}
var _local1 = 0;
while (_local1 < slices) {
m.identity();
m.b = m.b + sh1;
m.c = m.c + sh2;
m.rotate(r2);
m.translate((2 * _xmouse) / scl, ((2 * _ymouse) / scl) + ((_local1 * sclfact) * 10));
m.rotate(r);
m.scale(scl, scl);
slice.clear();
slice.lineStyle();
slice.moveTo(0, 0);
slice.beginBitmapFill(stampImage, m);
slice.lineTo(Math.cos((angle + nudge) - (Math.PI/2)) * diag, Math.sin((angle + nudge) - (Math.PI/2)) * diag);
slice.lineTo(Math.cos((-(angle + nudge)) - (Math.PI/2)) * diag, Math.sin((-(angle + nudge)) - (Math.PI/2)) * diag);
slice.lineTo(0, 0);
slice.endFill();
m.identity();
if (flip && ((_local1 % 2) == 1)) {
m.scale(-1, 1);
}
m.rotate(rot + ((_local1 * angle) * 2));
m.translate(hsize * 0.5, vsize * 0.5);
map.draw(slice, m, null, "normal", null, true);
_local1++;
}
}
var angle = (Math.PI / slices);
var slice = createEmptyMovieClip("slice", 0);
slice._visible = false;
var diag = (Math.sqrt((2 * hsize) * hsize) * 0.62);
var map = (new flash.display.BitmapData(hsize, vsize, true, 0));
var mapHolder = createEmptyMovieClip("mapHolder", 1);
var code;
mapHolder.attachBitmap(map, 0);
var image = flash.display.BitmapData.loadBitmap("image");
var stampImage = (new flash.display.BitmapData(image.width, image.height, false));
stampImage.draw(image, new flash.geom.Matrix(0.5, 0, 0, 0.5, 0, 0), null, "normal", null, true);
stampImage.draw(image, new flash.geom.Matrix(-0.5, 0, 0, 0.5, image.width, 0), null, "normal", null, true);
stampImage.draw(image, new flash.geom.Matrix(0.5, 0, 0, -0.5, 0, image.height), null, "normal", null, true);
stampImage.draw(image, new flash.geom.Matrix(-0.5, 0, 0, -0.5, image.width, image.height), null, "normal", null, true);
image.dispose();
var m = (new flash.geom.Matrix());
if (masktype == 1) {
this.createEmptyMovieClip("masker", 2);
_root.masker.beginFill(0);
x = 0;
y = 0;
r = hsize / 2;
_root.masker.moveTo(x, y - r);
var i = 0;
while (i <= (Math.PI*2)) {
_root.masker.lineTo(x + (r * Math.sin(i)), y - (r * Math.cos(i)));
i = i + (Math.PI/180);
}
_root.masker.lineTo(x, y - r);
_root.masker.endFill();
_root.slice.setMask(_root.masker);
} else if (masktype == 2) {
this.createEmptyMovieClip("masker", 2);
_root.masker.beginFill(0);
x = 0;
y = 0;
r = hsize / 2;
_root.masker.moveTo(x, y + r);
var i = 0;
while (i <= (Math.PI*2)) {
_root.masker.lineTo(x + (r * Math.sin(i)), y - (r * Math.cos(i)));
i = i + 2.0943951023932;
}
_root.masker.lineTo(x, y - r);
_root.masker.endFill();
_root.slice.setMask(_root.masker);
} else if (masktype == 3) {
this.createEmptyMovieClip("masker", 2);
_root.masker.beginFill(0);
x = 0;
y = 0;
r = hsize / 2;
_root.masker.moveTo(x, y + r);
var i = 0;
while (i <= (Math.PI*2)) {
_root.masker.lineTo(x + (r * Math.sin(i)), y - (r * Math.cos(i)));
i = i + 1.0471975511966;
}
_root.masker.lineTo(x, y - r);
_root.masker.endFill();
_root.slice.setMask(_root.masker);
} else if (masktype == 4) {
this.createEmptyMovieClip("masker", 2);
_root.masker.beginFill(0);
x = 0;
y = 0;
r = hsize / 2;
_root.masker.moveTo(x, y + r);
var i = 0;
while (i <= (Math.PI*2)) {
_root.masker.lineTo(x + (r * Math.sin(i)), y - (r * Math.cos(i)));
i = i + (Math.PI/4);
}
_root.masker.lineTo(x, y - r);
_root.masker.endFill();
_root.slice.setMask(_root.masker);
}
if (!registered) {
this.createTextField("unregmark", 3, 0, (vsize / 2) - 25, hsize, 100);
_root.unregmark.text = unregtext;
_root.unregmark.multiline = true;
_root.unregmark.type = "static";
_root.unregmark.selectable = false;
var my_fmt = new TextFormat();
my_fmt.font = "Tahoma";
my_fmt.bold = true;
my_fmt.align = "center";
my_fmt.color = 16711680 /* 0xFF0000 */;
my_fmt.size = 24;
my_fmt.underline = true;
_root.unregmark.setTextFormat(my_fmt);
var btnObj = new Object();
btnObj.onMouseUp = function () {
getURL (purchaseurl, "_blank", "GET");
};
Mouse.addListener(btnObj);
}
Key.addListener(this);