Форум 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)
-   -   Помогите забиндить клавиатуру к кнопкам (http://www.flasher.ru/forum/showthread.php?t=123966)

dieversochi 17.04.2009 01:20

Помогите забиндить клавиатуру к кнопкам
 
Ситуация такого характера. Есть скрипт 3 кнопки настроены на мышку хочу к ним добавить кнопки на клавиатуре. С АС не знаком. Будьте любездны и подробны!

Код AS1/AS2:

function onMouseDown()
    {
        if (btn_bet.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_bet.enabled)
            {
                return;
            } // end if
            this._onPress(btn_bet);
        } // end if
        if (btn_start.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_start.enabled)
            {
                return;
            } // end if
            this._onPress(btn_start);
        } // end if
        if (btn_double.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_double.enabled)
            {
                return;
            } // end if
            this._onPress(btn_double);
        } // end if
    } // End of the function
    function onMouseUp()
    {
        if (btn_bet.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_bet.enabled)
            {
                return;
            } // end if
            this._onReleaseBet();
        } // end if
        if (btn_start.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_start.enabled)
            {
                return;
            } // end if
            this._onReleaseStart();
        } // end if
        if (btn_double.hitTest(_root._xmouse, _root._ymouse, true))
        {
            if (!btn_double.enabled)
            {
                return;
            } // end if
            this._onReleaseDouble(btn_double);
        } // end if
    } // End of the function


iNils 17.04.2009 01:29

На форуме запрещено обсуждать код полученный в результате декомпиляции.


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

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