Да срабатывает.
Добавлено через 24 минуты

Код AS3:
package
{
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class btnInputMl1 extends MovieClip
{
public static var e:qwerty;
public static var r:window;
public static var t:winpass;
public static var u:PassTxt;
public static var muu:TextField;
public static var a:vx;
public static var wx:bbbtttnnn;
public function btnInputMl1()
{
addEventListener(MouseEvent.CLICK, clickHandler);
}
public function clickHandler(e:MouseEvent):void
{
pasword();
removeEventListener(MouseEvent.CLICK,clickHandler);
}
public function pasword()
{
btnInputMl1.wx.addEventListener(MouseEvent.CLICK, exit);
btnInputMl1.a.addEventListener(MouseEvent.CLICK, loginFunction);
}
public function exit(e:MouseEvent):void
{
removeChild(btnInputMl1.e);
removeChild(btnInputMl1.r);
removeChild(btnInputMl1.t);
removeChild(btnInputMl1.u);
removeChild(btnInputMl1.muu);
removeChild(btnInputMl1.a);
removeChild(btnInputMl1.wx);
wx.removeEventListener(MouseEvent.CLICK, exit);
a.removeEventListener(MouseEvent.CLICK, loginFunction);
trace("myau!!!!!");
addEventListener(MouseEvent.CLICK, clickHandler);
}
public function loginFunction(e:MouseEvent):void
{
if (muu.text == "qwerty")
{
trace("Complit!");
}
else
{
var lkj:qwerty = new qwerty();
addChild(lkj);
var ghj:ancorrectPassword = new ancorrectPassword();
addChild(ghj);
var ert:bbbtttnnn = new bbbtttnnn();
addChild(ert);
ert.x = 150;
ert.y = -70;
ert.addEventListener(MouseEvent.CLICK, kkk);
function kkk(e:MouseEvent):void
{
removeChild(lkj);
removeChild(ghj);
removeChild(ert);
ert.removeEventListener(MouseEvent.CLICK,kkk);
ert.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyboardDown);
}
ert.addEventListener(KeyboardEvent.KEY_DOWN, onKeyboardDown);
function onKeyboardDown(event:KeyboardEvent):void
{
if (event.keyCode == 27)
{
removeChild(lkj);
removeChild(ghj);
removeChild(ert);
ert.removeEventListener(MouseEvent.CLICK,kkk);
ert.removeEventListener(KeyboardEvent.KEY_DOWN, onKeyboardDown);
}
}
}
}
}
}
Тоже самое(((
при нажимании на кнопку закрытия окна входа, ничего не происходит.
только trace("myau!!!!!"); срабатывает.