Форум 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)
-   -   Создание компоненты и KillFocus (http://www.flasher.ru/forum/showthread.php?t=104890)

Nata_cher 04.12.2007 13:53

Создание компоненты и KillFocus
 
Код:

this.attachMovie("button","myButton_btn",this.getNextHighestDepth());
function createComponent(){
    this.createClassObject(TextArea, "my_ta", 4);
    }
function destroyComponent(){
        destroyObject("my_ta");
    }

createComponent();

my_ta.onKillFocus = function(newFocus){
        trace("не в фокусе");
        }
myButton_btn.onRelease = function(){
        destroyComponent();
        createComponent();
        }

проблемы заключается в следующем. При первом выполнении
createComponent();- my_ta.onKillFocus - выполняется. Но когда выполняется событие кнопки и createComponent(); выполянется во второй раз, my_ta.onKillFocus не выполняется.
В чем тут проблема?
Заранее спасибо.


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

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