Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 1.0/2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=93)
-   -   AS2 - AS3 (http://www.flasher.ru/forum/showthread.php?t=214570)

саша55555 24.09.2017 17:04

AS2 - AS3
 
Помогите переделать код 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();



Часовой пояс GMT +4, время: 09:48.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.