Показать сообщение отдельно
Старый 12.04.2011, 20:44
FriOne вне форума Посмотреть профиль Отправить личное сообщение для FriOne Найти все сообщения от FriOne
  № 1  
Ответить с цитированием
FriOne
 
Аватар для FriOne

Регистрация: Jul 2010
Адрес: Бердск, НСК
Сообщений: 171
Записей в блоге: 1
По умолчанию Не происходит событие

Не могу понять, почему не выполняется метод, при событии COMPLETE,
раньше все работало, то ли твинов понавтыкал, то ли еще что..
Вот событие на кнопке по клику:
Код AS3:
public function hideAll(e:Event):void
{
	TweenLite.to(this, 1, {alpha:0, onComplete:this.hiding});
}
public function hiding():void
{
	combo.alpha = 0;
	dataCount.alpha = 0;
	dispatchEvent(new Event(Event.COMPLETE));
}
Здесь его добавляю..
Код AS3:
public function loadCred(e:Event):void
{
	this.removeListeners();
	this.currentMenu = this.credit;
	this.hideButtons();
	TweenLite.to(this.res, 1, {alpha:0, onComplete:cred});
}
public function cred():void
{
	if(!credit){
		this.credit = new Credit();
		this.credit.bdValues = this.bdValues;
		this.credit.create();
		addChild(credit);
	}
	this.credit.addEventListener(Event.COMPLETE, showCredButton); //////тут
	TweenLite.to(this.credit, 1, {alpha:1});
}
public function showCredButton(e:Event):void
{
	this.credit.removeEventListener(Event.COMPLETE, showCredButton);
	swapChildren(this.currentMenu, this.res);
	this.showButtons();
	TweenLite.to(this.res, 1, {alpha:1, onComplete:this.addListeners});
}
По клику все прячется, но дальше не исполняет, подскажите в чем косяк.


Последний раз редактировалось FriOne; 12.04.2011 в 20:50.