Frame 1
loadImages = function () {
images.createEmptyMovieClip("intro", 1000);
images.intro.loadMovie("media/title.jpg");
images.intro._alpha = 0;
i = 1;
while (i <= cue_total) {
namer = "image_" + i;
images.createEmptyMovieClip(namer, i);
images[namer].loadMovie(("media/screen" + i) + ".jpg");
images[namer]._alpha = 0;
i++;
}
};
Instance of Symbol 27 MovieClip "amp_vals" in Frame 1
onClipEvent (load) {
this.loadVariables("media/sound_file.txt");
}
onClipEvent (data) {
_parent.data_loaded = true;
}
Instance of Symbol 27 MovieClip "cue_points" in Frame 1
onClipEvent (load) {
}
onClipEvent (data) {
}
Frame 4
cue_loaded = true;
if ((cue_loaded && (data_loaded)) && (amp_vals.ampDone == "1")) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 8
soundObject = new Sound();
soundObject.loadSound("media/buffer.mp3", false);
Frame 11
cut = int(amp_vals.amplitudeLeft.length / 20);
n = 0;
while (n <= amp_vals.amplitudeLeft.length) {
tempcut = cut;
counter++;
gh = "l_chunk" + counter;
checker = false;
while ((checker == false) && (counter < 21)) {
if (amp_vals.amplitudeLeft.substr(n + tempcut, 1) == ",") {
checker = true;
} else {
tempcut = tempcut + 1;
trace(tempcut);
}
}
this[gh] = amp_vals.amplitudeLeft.substr(n, tempcut);
n = n + cut;
}
counter = 1;
al = new Array();
amp_vals.amplitudeLeft = "";
Frame 13
function conCat() {
final_l = w1.concat(w2, w3, w4, w5, w6, w7, w8, w9, w10, w11, w12, w13, w14, w15, w16, w17, w18, w19, w20);
trace(final_l.length);
n = 0;
while (n <= 21) {
this["w" + n] = new Array();
n++;
}
}
gh = "l_chunk" + counter;
var ggg = ("w" + counter);
this[ggg] = this[gh].split(",");
counter++;
if (counter == 21) {
play();
j = 1;
while (j <= 20) {
var ggg = ("w" + j);
total_length_l = total_length_l + this[ggg].length;
n = 0;
while (n <= 21) {
this["l_chunk" + n] = "";
n++;
}
j++;
}
conCat();
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 17
counter = 0;
cut = int(amp_vals.amplitudeRight.length / 20);
n = 0;
while (n <= amp_vals.amplitudeRight.length) {
tempcut = cut;
counter++;
gh = "thing2" + counter;
checker = false;
while ((checker == false) && (counter < 21)) {
if (amp_vals.amplitudeRight.substr(n + tempcut, 1) == ",") {
checker = true;
} else {
tempcut = tempcut + 1;
trace(tempcut);
}
}
this[gh] = amp_vals.amplitudeRight.substr(n, tempcut);
n = n + cut;
}
counter = 1;
ar = new Array();
amp_vals.amplitudeRight = "";
Frame 19
function conCatRight() {
final_r = x1.concat(x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20);
trace(final_r.length);
n = 0;
while (n <= 21) {
this["x" + n] = new Array();
n++;
}
}
gh = "thing2" + counter;
var ggg = ("x" + counter);
this[ggg] = this[gh].split(",");
counter++;
if (counter == 21) {
play();
j = 1;
while (j <= 20) {
var ggg = ("x" + j);
total_length_r = total_length_r + this[ggg].length;
j++;
}
conCatRight();
} else {
gotoAndPlay(_currentframe - 1);
}
Frame 22
stop();
current_cue = 1;
start_Time = getTimer();
cue = 0;
soundObject = new Sound();
soundObject.loadSound("media/sound_file.mp3");
reality_check = false;
this.soundObject.onLoad = function () {
reality_check = true;
_root.play();
};
this.onEnterFrame = function () {
temp_alert = Math.floor((soundObject.getBytesLoaded() / soundObject.getBytesTotal()) * 100);
if ((reality_check == false) && (temp_alert == 100)) {
alert = "SOUND LOADING : " + (getTimer() - start_Time);
} else {
alert = ("SOUND : " + temp_alert) + " PERCENT LOADED";
}
if (((soundObject.getBytesLoaded() == soundObject.getBytesTotal()) && (checkloaded == cue_total)) && (cue_total > 0)) {
}
};
Frame 23
images.intro._alpha = 100;
app = false;
this.onEnterFrame = function () {
if (playing) {
var perc = (soundObject.position / soundObject.duration);
perc2 = perc;
if ((perc >= 0.946) && (!app)) {
app = true;
this.createEmptyMovieClip("endclip", 1564);
sndx = new Sound(this.endclip);
sndx.attachSound("bigapplause1");
sndx.start(0, 0);
}
var arrayIndex = int((final_l.length * perc) - (perc * 24));
sndl = final_l[arrayIndex];
sndr = final_r[arrayIndex];
if (sndl >= 2) {
sndl = sndl * 3;
}
if (sndr >= 2) {
sndr = sndr * 3;
}
}
};
stop();
Symbol 23 MovieClip [groupclip] Frame 1
this.onEnterFrame = function () {
if ((count == wait) && (init != 2)) {
init = 2;
this.createEmptyMovieClip("sclip", 1);
snd = new Sound(this.sclip);
snd.attachSound("group" + laugh);
offset = random(Math.round(snd.duration / 100)) / 10;
snd.start(0, 0);
sclip.transformobjecta = new Object();
amount_right = 40;
amount_left = 40;
sclip.transformobjecta.ll = amount_left;
sclip.transformobjecta.rl = 0;
sclip.transformobjecta.lr = 0;
sclip.transformobjecta.rr = amount_right;
snd.setTransform(sclip.transformobjecta);
} else {
count++;
}
if ((snd.duration > 100) && (snd.position >= snd.duration)) {
_parent.addGroup(this.laugh);
this.removeMovieClip();
}
};
Symbol 24 MovieClip [affirmationclip] Frame 1
this.onEnterFrame = function () {
if ((count == wait) && (init != 2)) {
init = 2;
this.createEmptyMovieClip("sclip", 1);
snd = new Sound(this.sclip);
snd.attachSound("a" + this.laugh);
offset = random(Math.round(snd.duration / 100)) / 10;
snd.start(0, 0);
sclip.transformobjecta = new Object();
amount_right = random(100);
amount_left = 100 - amount_right;
sclip.transformobjecta.ll = amount_left;
sclip.transformobjecta.rl = 0;
sclip.transformobjecta.lr = 0;
sclip.transformobjecta.rr = amount_right;
snd.setTransform(sclip.transformobjecta);
} else {
count++;
}
if ((snd.duration > 100) && (snd.position >= snd.duration)) {
_parent.addAffirmation(this.laugh);
this.removeMovieClip();
}
if (((snd.duration > 100) && (snd.position == 0)) && (count > 100)) {
_parent.addAffirmation(this.laugh);
this.removeMovieClip();
}
};
Symbol 25 MovieClip [applauseclip] Frame 1
this.onEnterFrame = function () {
if ((count == wait) && (init != 2)) {
init = 2;
this.createEmptyMovieClip("sclip", 1);
snd = new Sound(this.sclip);
snd.attachSound("applause" + this.laugh);
offset = random(Math.round(snd.duration / 100)) / 10;
snd.start(0, 0);
sclip.transformobjecta = new Object();
amount_right = random(100);
amount_left = 100 - amount_right;
sclip.transformobjecta.ll = 90;
sclip.transformobjecta.rl = 0;
sclip.transformobjecta.lr = 0;
sclip.transformobjecta.rr = 90;
snd.setTransform(sclip.transformobjecta);
} else {
count++;
}
if ((snd.duration > 100) && (snd.position >= snd.duration)) {
_parent.addApplause(this.laugh);
this.removeMovieClip();
}
if (((snd.duration > 100) && (snd.position == 0)) && (count > 100)) {
_parent.addApplause(this.laugh);
this.removeMovieClip();
}
};
Symbol 26 MovieClip [laughclip] Frame 1
this.onEnterFrame = function () {
if ((count == wait) && (init != 2)) {
init = 2;
this.createEmptyMovieClip("sclip", 1);
snd = new Sound(this.sclip);
snd.attachSound("laugh" + this.laugh);
offset = random(Math.round(snd.duration / 100)) / 10;
snd.start(0, 0);
sclip.transformobjecta = new Object();
amount_right = random(70);
amount_left = 70 - amount_right;
sclip.transformobjecta.ll = amount_left;
sclip.transformobjecta.rl = 0;
sclip.transformobjecta.lr = 0;
sclip.transformobjecta.rr = amount_right;
snd.setTransform(sclip.transformobjecta);
} else {
count++;
}
if ((snd.duration > 100) && (snd.position >= snd.duration)) {
_parent.addLaugh(this.laugh);
this.removeMovieClip();
}
if (((snd.duration > 100) && (snd.position == 0)) && (count > 100)) {
_parent.addLaugh(this.laugh);
this.removeMovieClip();
}
};
Symbol 49 MovieClip Frame 2
if (random(50) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 57 MovieClip Frame 2
if (random(50) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 64 MovieClip Frame 2
if (random(40) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 95 MovieClip Frame 1
this.onEnterFrame = function () {
gotoAndStop(random(this._totalframes));
};
Symbol 117 MovieClip Frame 2
if (random(50) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 124 MovieClip Frame 2
if (random(50) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 129 MovieClip Frame 2
if (random(40) == 25) {
play();
} else {
gotoAndPlay(_currentframe - 1);
}
Symbol 175 MovieClip Frame 1
this.onEnterFrame = function () {
gotoAndStop(random(this._totalframes));
};
Instance of Symbol 177 MovieClip "frog2" in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
cur_level_l = _parent._parent.sndl;
diff_l = cur_level_l - past_level_l;
frame_l = Math.floor((this.mouth._totalframes * cur_level_l) / 100);
if (frame_l == 0) {
frame_l = 1;
}
this.mouth.gotoAndStop(frame_l);
_parent.mouthshadow2.gotoAndStop(frame_l);
past_level_l = cur_level_l;
}
Instance of Symbol 178 MovieClip "frog" in Symbol 179 MovieClip Frame 1
onClipEvent (enterFrame) {
cur_level_r = _parent._parent.sndr;
diff_r = cur_level_r - past_level_r;
frame_r = Math.floor((this.mouth._totalframes * cur_level_r) / 100);
if (frame_r == 0) {
frame_r = 1;
}
this.mouth.gotoAndStop(frame_r);
_parent.mouthshadow.gotoAndStop(frame_r);
past_level_r = cur_level_r;
}
Symbol 184 Button
on (press) {
soundObject.stop();
soundObject.start();
this.play_nut._visible = false;
playing = true;
}
Symbol 185 MovieClip Frame 1
function addLaugh(item) {
laughArray.push(item);
}
function addApplause(item) {
applauseArray.push(item);
}
function addGroup(item) {
groupArray.push(item);
}
function addAffirmation(item) {
affirmationArray.push(item);
}
function makeLaughs(num_laughs) {
laughArray = reshuffleArray(laughArray);
i = 1;
while (i <= num_laughs) {
count++;
var obj = ("clip" + count);
if (laughArray[i] > 0) {
this.attachMovie("laughclip", obj, count);
this[obj].laugh = laughArray[i];
laughArray.splice(i, 1);
this[obj].wait = random(10) + 2;
}
i++;
}
}
function makeGroupLaughs() {
groupArray = reshuffleArray(groupArray);
count++;
var obj = ("group" + count);
if (groupArray.length == 3) {
this.attachMovie("groupclip", obj, count);
this[obj].laugh = groupArray[0];
this[obj].wait = 1;
groupArray.splice(0, 1);
}
}
function makeApplause(num_applause) {
applauseArray = reshuffleArray(applauseArray);
i = 1;
while (i <= num_applause) {
count++;
var obj = ("clip" + count);
if (applauseArray[i] > 0) {
this.attachMovie("applauseclip", obj, count);
this[obj].laugh = applauseArray[i];
applauseArray.splice(i, 1);
this[obj].wait = random(10) + 2;
}
i++;
}
}
function makeAffirmations(num_a) {
affirmationArray = reshuffleArray(affirmationArray);
i = 1;
while (i <= num_a) {
count++;
var obj = ("aff" + count);
if (affirmationArray[i] > 0) {
this.attachMovie("affirmationclip", obj, count);
this[obj].laugh = affirmationArray[i];
this[obj].wait = random(30) + 2;
affirmationArray.splice(i, 1);
}
i++;
}
}
function reshuffleArray(arraytype) {
returnArray = new Array();
subArray = new Array();
subArray = arraytype;
tempArray = new Array();
n = 0;
while (n < subArray.length) {
tempArray[n] = n;
n++;
}
n = 0;
while (n < subArray.length) {
ran = random(tempArray.length);
returnArray[n] = subArray[tempArray[ran]];
tempArray.splice(ran, 1);
n++;
}
return(returnArray);
}
function overallVol() {
overall_level.setVolume(cur_vol - ((cur_vol - tar_vol) * 0.1));
overall_level.setVolume(60);
}
function bigValley() {
if (cur_level > 30) {
talk_time++;
}
if (cur_level < 10) {
silence_time++;
} else {
silence_time = 0;
}
if (diff < -10) {
silence_time = 0;
}
send_time = talk_time;
if (send_time > 5) {
send_time = 5;
}
if ((silence_time > 20) && (talk_time > 48)) {
if (laughter) {
rndo = random(3);
if (rndo > 1) {
makeLaughs(send_time / 2);
makeGroupLaughs();
}
}
if (affirmations) {
makeAffirmations(send_time);
}
if (talk_time > 80) {
rndo = random(3);
if (applause) {
if (rndo > 1) {
makeApplause(1);
}
}
}
talk_time = -10;
}
}
function smallPeak() {
if ((diff <= -30) && (cur_level < 20)) {
if (mode == 1) {
makeLaughs();
} else {
makeAffirmations();
makeLaughs();
}
}
if ((diff < 2) && (cur_level > 96)) {
makeGroupLaughs();
makeAffirmations();
}
}
overall_level = new Sound(this);
overall_level.setVolume(50);
laughter = true;
applause = true;
laughArray = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13);
groupArray = new Array(1, 2, 3);
applauseArray = new Array(1, 2, 3, 4);
affirmationArray = new Array(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
this.onEnterFrame = function () {
cur_level = _parent.sndl;
diff = cur_level - past_level;
bigValley();
if ((!panel.swelling) && (!panel.ovating)) {
}
past_level = cur_level;
};
stop();