Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   ActionScript 3.0 (http://www.flasher.ru/forum/forumdisplay.php?f=83)
-   -   помогите переписать код с AS2 на AS3 (lite) (http://www.flasher.ru/forum/showthread.php?t=145949)

ZIPer 24.10.2010 13:26

помогите переписать код с AS2 на AS3 (lite)
 
Срочно нужно переписать код из AS2 на AS3 (lite)
по скольку я ноль в AS3 обращаюсь к вам за помощью

Код AS1/AS2:

fscommand2("FullScreen");
status = fscommand2("DisableKeypadCompatibilityMode");
status = fscommand2("FullScreen", true);
Stage.scaleMode = "noScale";
Stage.align = "TL";
Stage.addListener(this);
 
var my_sound1:Sound = new Sound();
my_sound1.attachSound("s1");
var my_sound2:Sound = new Sound();
my_sound2.attachSound("s2");
var my_sound3:Sound = new Sound();
my_sound3.attachSound("s3");
var my_sound4:Sound = new Sound();
my_sound4.attachSound("s4");
var my_sound5:Sound = new Sound();
my_sound5.attachSound("s5");
var my_sound6:Sound = new Sound();
my_sound6.attachSound("s6");
var my_sound7:Sound = new Sound();
my_sound7.attachSound("s7");
 
onEnterFrame = function ()
{
        site._x = Stage.width / 2;
        site._y = Stage.height
        ex._x = Stage.width
        ex._y = 0
        bg._x = Stage.width / 2;
        bg._y = Stage.height / 2;
        bg._height = Stage.height;
        bg._width = Stage.width;
        btn._x = Stage.width / 2;
        btn._y = Stage.height / 2;
        if(btn._width+30 >= Stage.width){
                btn._width = Stage.width-30
                btn._height = btn._xscale
        }else{
                btn._width = 290
                btn._height = btn._xscale
        }
};
 
btn.onRelease = function(){
        s = random(7) + 1;
        if (s == 1)
        {
                trace("1");
                my_sound1.start();
        }
        if (s == 2)
        {
                trace("2");
                my_sound2.start();
        }
        if (s == 3)
        {
                trace("3");
                my_sound3.start();
        }
        if (s == 4)
        {
                trace("4");
                my_sound4.start();
        }
                if (s == 5)
        {
                trace("5");
                my_sound5.start();
        }
                if (s == 6)
        {
                trace("6");
                my_sound6.start();
        }
                if (s == 7)
        {
                trace("7");
                my_sound7.start();
        }
}
ex.onRelease = function(){
        fscommand2("Quit");
}

могу отблагодарить подарками ВКонтакте, или Яндекс деньгами


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

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