Frame 1
loadMovieNum ("../nav.swf", 100);
Instance of Symbol 76 MovieClip "btn4" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 4;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 80 MovieClip "btn3" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 3;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 84 MovieClip "btn7" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 7;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 88 MovieClip "btn2" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 2;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 92 MovieClip "btn5" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 5;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 96 MovieClip "btn8" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 8;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 100 MovieClip "btn6" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 6;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 103 MovieClip "btn1" in Frame 10
on (press) {
dbtn.gotoAndPlay("down");
}
on (release) {
dbtn.gotoAndStop("up");
gotoAndPlay ("play");
iam = 1;
btnhit = true;
_parent.btnhit4record = true;
_parent.record = iam;
}
on (rollOver) {
this._alpha = 75;
}
on (rollOut) {
this._alpha = 100;
}
Instance of Symbol 70 MovieClip "recordIt" in Frame 11
on (release) {
if ((this._currentframe == 3) || (this._currentframe == 1)) {
_parent.recordYourSong.gotoAndPlay("open");
} else {
_parent.stoprecordSong();
this.gotoAndStop(1);
}
}
on (rollOver) {
if ((this._currentframe == 3) || (this._currentframe == 1)) {
this.gotoAndStop("over");
}
}
on (rollOut) {
if ((this._currentframe == 3) || (this._currentframe == 1)) {
this.gotoAndStop(1);
}
}
Frame 32
function playSong(songArray, titleIs, songTempo) {
endall();
playnote = true;
nextBtn = false;
notesPlayed = new Array();
playBackOnRelease(notesPlayed, songTempo);
if (songArray[0] == 1) {
notesPlayed.push("So");
}
if (songArray[0] == 2) {
notesPlayed.push("La");
}
if (songArray[0] == 3) {
notesPlayed.push("Ti");
}
if (songArray[0] == 4) {
notesPlayed.push("Do");
}
if (songArray[0] == 5) {
notesPlayed.push("Do");
}
if (songArray[0] == 6) {
notesPlayed.push("Re");
}
if (songArray[0] == 7) {
notesPlayed.push("Mi");
}
if (songArray[0] == 8) {
notesPlayed.push("Fa");
}
title.text = titleIs;
title2.text = titleIs;
trace(songArray.length);
i = 0;
monitorPlay = function () {
sheet = notesPlayed;
trace(notesPlayed);
if (playnote && (nextBtn)) {
trace("got this far");
i++;
a = songArray[i];
thisBtn = a;
if (a == 1) {
notesPlayed.push("So");
}
if (a == 2) {
notesPlayed.push("La");
}
if (a == 3) {
notesPlayed.push("Ti");
}
if (a == 4) {
notesPlayed.push("*Do");
}
if (a == 5) {
notesPlayed.push("Do");
}
if (a == 6) {
notesPlayed.push("Re");
}
if (a == 7) {
notesPlayed.push("Mi");
}
if (a == 8) {
notesPlayed.push("Fa");
}
_root["btn" + a].dbtn.gotoAndStop("show");
playnote = false;
nextBtn = false;
} else if (playnote) {
trace("the other path");
a = songArray[i];
thisBtn = a;
_root["btn" + a].dbtn.gotoAndStop("show");
playnote = false;
}
if (i >= songArray.length) {
trace("end interval");
clearInterval(monitorPlayInterval);
hooray.play();
printNotes(notesPlayed, titleIs);
playbackBtn._visible = true;
}
};
monitorPlayInterval = setInterval(monitorPlay, 20);
}
function endall() {
clearInterval(monitorPlayInterval);
playnote = true;
nextBtn = false;
i = 0;
b = 1;
while (b <= 8) {
_root["btn" + b].dbtn.gotoAndStop("idle");
b++;
}
printBtn._visible = false;
playbackBtn._visible = false;
}
function printNotes(notes, titleIs) {
staff.printTitle.embedFonts = true;
staff.printTitle.setTextFormat(new TextFormat("spumoni"));
staff.printTitle2.embedFonts = true;
staff.printTitle2.setTextFormat(new TextFormat("spumoni"));
staff.printTitle.text = titleIs;
staff.printTitle2.text = titleIs;
numNotes = notes.length;
numStaffs = Math.ceil(numNotes / 10);
trace(numNotes + "number of notes");
staff.originalNote._visible = false;
staff.originalStaff._visible = false;
i = 1;
while (i < (numStaffs + 1)) {
if (numNotes >= 10) {
notesPerStaff = 10;
numNotes = numNotes - 10;
} else {
notesPerStaff = numNotes;
}
staff.originalStaff.duplicateMovieClip("staff" + i, 50 + i);
staff["staff" + i]._x = 0;
staff["staff" + i]._y = (staff["staff" + (i - 1)]._y + staff["staff" + (i - 1)]._height) + 50;
s = i * 10;
while (s < (notesPerStaff + (i * 10))) {
staff["staff" + i].originalNote.duplicateMovieClip("note" + s, 100 + s);
staff["staff" + i].originalNote._visible = false;
staff["staff" + i]["note" + s]._x = (staff["staff" + i]["note" + (s - 1)]._x + staff["staff" + i]["note" + (s - 1)]._width) + 25;
staff["staff" + i]["note" + s].whatNote.text = notes[s - 10];
if (notes[s - 10] == "So") {
staff["staff" + i]["note" + s]._y = 39;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(1);
}
if (notes[s - 10] == "La") {
staff["staff" + i]["note" + s]._y = 29;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(2);
}
if (notes[s - 10] == "Ti") {
staff["staff" + i]["note" + s]._y = 22;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(3);
}
if (notes[s - 10] == "*Do") {
staff["staff" + i]["note" + s]._y = 10;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(4);
}
if (notes[s - 10] == "Do") {
staff["staff" + i]["note" + s]._y = 75;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(5);
}
if (notes[s - 10] == "Re") {
staff["staff" + i]["note" + s]._y = 66;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(6);
}
if (notes[s - 10] == "Mi") {
staff["staff" + i]["note" + s]._y = 56;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(7);
}
if (notes[s - 10] == "Fa") {
staff["staff" + i]["note" + s]._y = 48;
staff["staff" + i]["note" + s].noteBG.gotoAndStop(8);
}
s++;
}
i++;
}
printBtn._visible = true;
}
function recordSong(titleIs) {
trace("begining of record");
recordTitle = titleIs;
title.text = recordTitle;
title2.text = recordTitle;
timeBetween = new Array();
n = 0;
time = 0;
record = 0;
btnhit4record = false;
endall();
notesRecorded = new Array();
playBackOnRelease(notesRecorded, timeBetween);
recordPlay = function () {
sheet = notesRecorded;
if (btnhit4record) {
trace("got this far");
trace(record);
curTime = getTimer();
if (n == 0) {
time = 0;
} else {
time = curTime - startTime;
trace(time + " time");
}
timeBetween.push(time);
trace("n = " + n);
if (record == 1) {
notesRecorded.push("So");
}
if (record == 2) {
notesRecorded.push("La");
}
if (record == 3) {
notesRecorded.push("Ti");
}
if (record == 4) {
notesRecorded.push("*Do");
}
if (record == 5) {
notesRecorded.push("Do");
}
if (record == 6) {
notesRecorded.push("Re");
}
if (record == 7) {
notesRecorded.push("Mi");
}
if (record == 8) {
notesRecorded.push("Fa");
}
trace((timeBetween[n] + " for note ") + notesRecorded[n]);
btnhit4record = false;
startTime = getTimer();
n++;
}
};
recordPlayInterval = setInterval(recordPlay, 20);
}
function stoprecordSong() {
clearInterval(recordPlayInterval);
hooray.play();
printNotes(notesRecorded, recordTitle);
playbackBtn._visible = true;
}
function playBack(notes, times) {
trace("playBack");
q = 0;
b = 0;
backPlay = function () {
trace("playback");
note = notes[q];
waitTime = times[q];
newTime = getTimer() - beginTime;
if (q == 0) {
go = true;
} else if (newTime >= waitTime) {
go = true;
} else {
go = false;
}
if (go) {
if (note == "So") {
b = 1;
}
if (note == "La") {
b = 2;
}
if (note == "Ti") {
b = 3;
}
if (note == "*Do") {
b = 4;
}
if (note == "Do") {
b = 5;
}
if (note == "Re") {
b = 6;
}
if (note == "Mi") {
b = 7;
}
if (note == "Fa") {
b = 8;
}
_root["btn" + b].gotoAndStop("play");
_root["btn" + b].dbtn.gotoAndPlay("over");
q++;
go = false;
beginTime = getTimer();
}
if (q >= notes.length) {
clearInterval(playBackInterval);
playbackBtn.enabled = true;
}
};
playBackInterval = setInterval(backPlay, 20);
}
function playBackOnRelease(notes, times) {
playbackBtn.onRelease = function () {
trace("hit");
playBack(notes, times);
this.enabled = false;
};
}
stop();
printBtn._visible = false;
playbackBtn._visible = false;
maryArray = [2, 1, 8, 1, 2, 2, 2, 1, 1, 1, 2, 4, 4, 2, 1, 8, 1, 2, 2, 2, 2, 1, 1, 2, 1, 8];
maryTempoArray = [0, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 1000, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500];
twinkleArray = [5, 5, 1, 1, 2, 2, 1, 8, 8, 7, 7, 6, 6, 5, 1, 1, 8, 8, 7, 7, 6, 1, 1, 8, 8, 7, 7, 6, 5, 5, 1, 1, 2, 2, 1, 8, 8, 7, 7, 6, 6, 5];
twinkleTempoArray = [0, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500, 1000, 500, 500, 500, 500, 500, 500];
jingleArray = [2, 2, 2, 2, 2, 2, 2, 4, 8, 1, 2, 3, 3, 3, 3, 2, 2, 2, 4, 4, 3, 2, 8];
agArray = [1, 4, 7, 7, 6, 4, 2, 1, 1, 4, 7, 7, 6, 1, 7, 1, 7, 7, 6, 4, 2, 1, 1, 4, 7, 7, 6, 5];
smallArray = [1, 4, 7, 7, 6, 4];
title.embedFonts = true;
title.setTextFormat(new TextFormat("spumoni"));
title2.embedFonts = true;
title2.setTextFormat(new TextFormat("spumoni"));
printBtn.onRelease = function () {
printAsBitmap ("staff", "bframe");
};
Instance of Symbol 123 MovieClip in Frame 32
on (rollOver) {
gotoAndPlay ("open");
}
on (rollOut) {
gotoAndPlay ("close");
}
on (release) {
trace("click");
_parent.instructions.gotoAndPlay("open");
}
Symbol 42 Button
on (release) {
_parent._parent.playSong(_parent._parent.twinkleArray, "Twinkle Twinkle Little Star", _parent._parent.twinkleTempoArray);
}
Symbol 47 Button
on (release) {
_parent._parent.playSong(_parent._parent.maryArray, "Mary Had a Little Lamb", _parent._parent.maryTempoArray);
}
Symbol 57 MovieClip Frame 1
var mi_objetivo = "showNav";
stop();
Instance of Symbol 52 MovieClip "slide" in Symbol 57 MovieClip Frame 1
onClipEvent (load) {
var objetivo = _parent.mi_objetivo;
var sostenido = false;
var razon = (this._parent._parent[objetivo]._height / this._height);
var deslizar;
razon = int(razon);
}
on (press) {
startDrag (this, false, this._parent.barra._x, this._parent.barra._y, this._parent.barra._x, (this._parent.barra._y + this._parent.barra._height) - this._height);
this.sostenido = true;
}
on (release) {
stopDrag();
this.sostenido = false;
}
on (releaseOutside) {
stopDrag();
this.sostenido = false;
}
onClipEvent (mouseMove) {
if (this.sostenido) {
trace(razon + "razon");
trace(this._y);
trace(this._parent.barra._y);
trace(this._parent._parent[objetivo]._height);
razon = this._parent._parent[objetivo]._height / this._height;
razon = int(razon);
deslizar = this._y - this._parent.barra._y;
deslizar = int(deslizar);
this._parent._parent[objetivo]._y = (-(razon * deslizar)) / razon;
}
}
Instance of Symbol 54 MovieClip "downArrow" in Symbol 57 MovieClip Frame 1
onClipEvent (load) {
this._y = _parent.barra._y + _parent.barra._height;
var objetivo = _parent.mi_objetivo;
var sostenido = false;
var razon = (this._parent._parent[objetivo]._height / _parent.slide._height);
var deslizar;
razon = int(razon);
}
on (press) {
if (_parent.slide._y < ((this._parent.barra._y + this._parent.barra._height) - _parent.slide._height)) {
this.onEnterFrame = function () {
_parent.slide._y = _parent.slide._y + 5;
deslizar = _parent.slide._y - _parent.barra._y;
deslizar = int(deslizar);
this._parent._parent[objetivo]._y = (-(razon * deslizar)) / razon;
if (this._parent.slide._y >= ((this._parent.barra._y + this._parent.barra._height) - this._parent.slide._height)) {
this._parent.slide._y = (this._parent.barra._y + this._parent.barra._height) - this._parent.slide._height;
delete this.onEnterFrame;
}
};
}
}
on (release) {
delete this.onEnterFrame;
}
on (releaseOutside) {
delete this.onEnterFrame;
}
Instance of Symbol 56 MovieClip "upArrow" in Symbol 57 MovieClip Frame 1
onClipEvent (load) {
this._y = _parent.barra._y;
var objetivo = _parent.mi_objetivo;
var sostenido = false;
var razon = (this._parent._parent[objetivo]._height / _parent.slide._height);
var deslizar;
razon = int(razon);
}
on (press) {
if (_parent.slide._y > this._parent.barra._y) {
this.onEnterFrame = function () {
_parent.slide._y = _parent.slide._y - 5;
deslizar = _parent.slide._y - _parent.barra._y;
deslizar = int(deslizar);
this._parent._parent[objetivo]._y = (-(razon * deslizar)) / razon;
if (_parent.slide._y <= this._parent.barra._y) {
_parent.slide._y = this._parent.barra._y;
delete this.onEnterFrame;
}
};
}
}
on (release) {
delete this.onEnterFrame;
}
on (releaseOutside) {
delete this.onEnterFrame;
}
Instance of Symbol 57 MovieClip "scrollBar" in Symbol 58 MovieClip Frame 1
onClipEvent (enterFrame) {
if (_parent.showNav._height > this._height) {
this._visible = true;
} else {
this._visible = false;
this.slide._y = 0 + this.downArrow._height;
}
}
Symbol 70 MovieClip Frame 1
stop();
Symbol 70 MovieClip Frame 2
stop();
Symbol 74 MovieClip Frame 1
stop();
Symbol 74 MovieClip Frame 8
gotoAndStop ("idle");
Symbol 74 MovieClip Frame 9
stop();
Symbol 74 MovieClip Frame 10
stop();
Symbol 74 MovieClip Frame 11
stop();
Symbol 76 MovieClip Frame 1
stop();
Symbol 76 MovieClip Frame 2
play();
Symbol 76 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 78 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 78 MovieClip Frame 8
stop();
Symbol 78 MovieClip Frame 9
stop();
Symbol 78 MovieClip Frame 10
stop();
Symbol 80 MovieClip Frame 1
stop();
Symbol 80 MovieClip Frame 2
play();
Symbol 80 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 82 MovieClip Frame 8
stop();
Symbol 82 MovieClip Frame 9
stop();
Symbol 82 MovieClip Frame 10
stop();
Symbol 84 MovieClip Frame 1
stop();
Symbol 84 MovieClip Frame 2
play();
Symbol 84 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 86 MovieClip Frame 1
stop();
Symbol 86 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 86 MovieClip Frame 8
stop();
Symbol 86 MovieClip Frame 9
stop();
Symbol 86 MovieClip Frame 10
stop();
Symbol 88 MovieClip Frame 1
stop();
Symbol 88 MovieClip Frame 2
play();
Symbol 88 MovieClip Frame 5
trace("hell yes");
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 90 MovieClip Frame 1
stop();
Symbol 90 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 90 MovieClip Frame 8
stop();
Symbol 90 MovieClip Frame 9
stop();
Symbol 90 MovieClip Frame 10
stop();
Symbol 92 MovieClip Frame 1
stop();
Symbol 92 MovieClip Frame 2
play();
Symbol 92 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 94 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 94 MovieClip Frame 8
stop();
Symbol 94 MovieClip Frame 9
stop();
Symbol 94 MovieClip Frame 10
stop();
Symbol 96 MovieClip Frame 1
stop();
Symbol 96 MovieClip Frame 2
play();
Symbol 96 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 98 MovieClip Frame 8
stop();
Symbol 98 MovieClip Frame 9
stop();
Symbol 98 MovieClip Frame 10
stop();
Symbol 100 MovieClip Frame 1
stop();
Symbol 100 MovieClip Frame 2
play();
Symbol 100 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 101 MovieClip Frame 1
stop();
Symbol 101 MovieClip Frame 7
gotoAndStop ("idle");
Symbol 101 MovieClip Frame 8
stop();
Symbol 101 MovieClip Frame 9
stop();
Symbol 101 MovieClip Frame 10
stop();
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 2
play();
Symbol 103 MovieClip Frame 5
if (_parent.thisBtn == iam) {
_parent.nextBtn = true;
}
if (btnhit) {
_parent.playnote = true;
btnhit = false;
}
Symbol 117 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 1
stop();
Symbol 123 MovieClip Frame 6
stop();
Symbol 131 Button
on (release) {
play();
}
Symbol 132 MovieClip Frame 1
stop();
Symbol 132 MovieClip Frame 8
stop();
Symbol 142 Button
on (release) {
_parent.recordSong(recordTitle);
_parent.recordIt.gotoAndStop(2);
gotoAndPlay ("close");
}
Symbol 147 Button
on (release) {
gotoAndPlay ("close");
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 8
stop();