Frame 1
function CALC_Dist_Xv_Yv(x1, y1, x2, y2) {
A = {};
B = {};
A.xx = x1;
A.yy = y1;
B.xx = x2;
B.yy = y2;
dx = A.xx - B.xx;
dy = A.yy - B.yy;
distance = Math.sqrt((dx * dx) + (dy * dy));
return([distance, x_modifier, y_modifier, dx, dy]);
}
function Collide(item1, item2) {
calc12312 = CALC_Dist_Xv_Yv(item1._x, item1._y, item2._x, item2._y);
distance = calc12312[0];
if (distance < min_stolknovenie) {
_root.smoker._x = _root.smoker._x + 30;
_root.smoker._y = _root.smoker._y + 30;
}
}
function MoveSomker(mc) {
mc._y = 0;
mc._x = 0;
mc.onEnterFrame = function () {
};
}
function moving(mc) {
mc.life = mc.life - 2;
mc._xscale = (mc._yscale = 100 - (mc.life * 3));
if (!mc.life) {
delete mc.onEnterFrame;
mc.removeMovieClip();
}
}
xspeed = 15;
yspeed = 15;
min_stolknovenie = 63;
Mouse.hide();
var gfp = (new flash.filters.GlowFilter(15269649, 26, 20, 20, 2, 3, false, false));
_root.onMouseMove = function () {
var _local2 = this.getNextHighestDepth();
var _local3 = follower.duplicateMovieClip("z" + _local2, _local2, {_x:_xmouse, _y:_ymouse, life:10});
_local3.onEnterFrame = function () {
moving(this);
};
};
ball.onEnterFrame = function () {
Collide(smoker, ball);
ball.filters = [gfp];
ball._x = ball._x + ((_xmouse - ball._x) / xspeed);
ball._y = ball._y + ((_ymouse - ball._y) / yspeed);
if (gfp.blurX <= 6) {
gfp.blurX = gfp.blurX + 6;
gfp.blurY = gfp.blurY + 6;
} else {
gfp.blurX = gfp.blurX - 1;
gfp.blurY = gfp.blurY - 1;
}
_root.onMouseDown = function () {
xspeed = 5;
yspeed = 5;
};
_root.onMouseUp = function () {
xspeed = 15;
yspeed = 15;
};
};
Instance of Symbol 3 MovieClip "ball" in Frame 1
onClipEvent (enterFrame) {
}
Instance of Symbol 5 MovieClip in Frame 1
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
}
Symbol 7 MovieClip Frame 5
stop();