Помогите переделать код c AS1 на as3
Код AS1/AS2:
function initGame(n)
{
notes = new Array();
scoreDisplay = "Score: 0";
addNewNote();
}
function addNewNote()
{
r = int(Math.Random() * 4 + 1);
notes.push(r);
}
function startRepeat()
{
repeatNum = 0;
gotoAndPlay("repeat");
}
function clickBird(note)
{
_root["bird" + note].gotoAndPlay(2);
_root["note" + note].gotoAndPlay(2);
if (note == notes[repeatNum])
{
++repeatNum;
if (repeatNum > notes.length - 1)
{
scoreDisplay = "Score: " + notes.length;
gotoAndPlay("correct");
}
return;
}
gotoAndPlay("wrong");
}
initGame();
stop();