Combined Code
movieClip 5 particle {
frame 10 {
this.removeMovieClip();
}
}
movieClip 7 bite2 {
}
movieClip 9 bite1 {
}
frame 1 {
function onEnterFrame() {
Stage.scaleMode = 'noScale';
Stage.align = '';
var v3 = Stage.width / MOVIE_WIDTH;
var v1 = Stage.height / MOVIE_HEIGHT;
var v2 = Math.min(v3, v1);
logo._yscale = v2 * 100;
logo._xscale = logo._yscale;
helpText._y = initHelpY + (1 - v1) * MOVIE_HEIGHT / 2;
helpText._yscale = 100 * Math.min(1, Stage.width / initHelpWidth);
helpText._xscale = helpText._yscale;
}
var MOVIE_WIDTH = 600;
var MOVIE_HEIGHT = 400;
var initHelpY = 24;
var initHelpWidth = 300;
}
movieClip 13 {
}
movieClip 16 {
}
movieClip 19 {
}
movieClip 20 {
}
movieClip 24 {
}
movieClip 27 {
}
movieClip 29 {
}
movieClip 31 {
}
movieClip 33 {
}
movieClip 35 {
}
movieClip 37 {
}
button 39 {
on (release) {
onClick();
}
}
movieClip 40 {
frame 1 {
if (!initialzied) {
var initialized = true;
sndBite1 = new Sound();
sndBite1.attachSound('sndBite1');
sndBite2 = new Sound();
sndBite2.attachSound('sndBite2');
sndStart = new Sound();
sndStart.attachSound('sndStart');
}
}
frame 46 {
function onEnterFrame() {
var v1 = 0;
while (v1 < clips.length) {
updateClip(clips[v1]);
++v1;
}
_y = _y + globalYVel;
globalYVel += (globalTargetY - _y) * 1.5;
globalYVel *= 0.5;
if (Math.abs(globalYVel) < 0.01) {
globalYVel = 0;
_y = globalTargetY;
}
_rotation = globalRot;
}
function updateClip(clip) {
var v3 = _xmouse - clip.startX;
var v2 = _ymouse - clip.startY;
var v5 = Math.sqrt(v3 * v3 + v2 * v2);
v3 /= v5;
v2 /= v5;
var v12 = 100;
var v11 = 25;
var v8 = v11 * Math.max(1 - v5 / v12, 0);
var v10 = clip.startX - v3 * v8;
var v9 = clip.startY - v2 * v8;
clip.targetX = v10;
clip.targetY = v9;
var v13 = Math.max(0, 1 - v5 / 200);
var v7 = Math.atan2(v2, v3) * 180 / Math.PI + (_ymouse > 0 ? -90 : 90);
v7 = Math.max(Math.min(v7, 25), -25);
clip.targetRot = v13 * v7;
if (clip.targetRot > 180) {
clip.targetRot -= 360;
} else {
if (clip.targetRot <= -180) {
clip.targetRot += 360;
}
}
var v6 = 0.25;
clip._x += (v10 - clip._x) * v6;
clip._y += (v9 - clip._y) * v6;
var v4 = clip.targetRot - clip._rotation;
if (v4 > 180) {
v4 -= 360;
} else {
if (v4 < -180) {
v4 += 360;
}
}
clip._rotation += v4 * v6;
}
function onClick() {
++biteNum;
if (biteNum == 1) {
sndBite1.start();
rClip._visible = false;
var v2 = uClip.attachMovie('bite1', 'bite', 0);
v2._x -= uClip.startX;
v2._y -= uClip.startY;
uClip.setMask(uClip.bite);
spawnParticles(uClip, 3);
jostleClips();
globalRot = -3;
} else {
if (biteNum == 2) {
sndBite1.start();
uClip.setMask(null);
uClip._visible = false;
uClip.bite.removeMovieClip();
f1Clip._visible = false;
var v2 = f2Clip.attachMovie('bite2', 'bite', 0);
v2._x -= f2Clip.startX;
v2._y -= f2Clip.startY;
f2Clip.setMask(f2Clip.bite);
v2 = lClip.attachMovie('bite2', 'bite', 0);
v2._x -= lClip.startX;
v2._y -= lClip.startY;
lClip.setMask(lClip.bite);
spawnParticles(f2Clip, 3);
jostleClips();
globalRot = 3;
} else {
if (biteNum == 3) {
sndBite2.start();
var v1 = 0;
while (v1 < clips.length) {
clips[v1].bite.removeMovieClip();
clips[v1].setMask(null);
clips[v1]._visible = false;
++v1;
}
spawnParticles(eClip, 4);
jostleClips();
globalRot = 0;
} else {
delete onEnterFrame;
gotoAndPlay(1);
sndStart.start();
}
}
}
}
function jostleClips() {
var v2 = 10;
var v1 = 0;
while (v1 < clips.length) {
var v3 = clips[v1];
v3._x += Math.random() * v2 - v2 / 2;
v3._y += Math.random() * v2 - v2 / 2;
++v1;
}
globalYVel = 5;
}
function spawnParticles(targetClip, numParticles) {
var v3 = 0;
while (v3 < numParticles) {
var v1 = attachMovie('particle', 'particle' + particleNum, particleNum);
v1._x = targetClip._x - Math.random() * 30;
v1._y = targetClip._y + Math.random() * 70 - 35;
v1._rotation = -180 + targetClip._rotation + -(v1._y - targetClip._y) * 2;
++particleNum;
++v3;
}
}
stop();
var clips = [rClip, uClip, f1Clip, f2Clip, lClip, eClip];
var biteNum = 0;
var particleNum = 0;
var globalRot = 0;
var globalTargetY = _root.MOVIE_HEIGHT / 2;
var globalYVel = 0;
btn._xscale = Stage.width * 2;
btn._yscale = Stage.height * 2;
var i = 0;
while (i < clips.length) {
var clip = clips[i];
clip.startX = clip._x;
clip.startY = clip._y;
clip.targetX = clip.startX;
clip.targetY = clip.startY;
clip.targetRot = clip._rotation;
++i;
}
}
}
// unknown tag 88 length 282
movieClip 44 {
frame 90 {
stop();
}
}