在这里我有一些 xml 按钮,当我想在当前按钮上进行补间时,补间在文本上不起作用不知道为什么以及何时我想从当前按钮中删除事件侦听器,它不起作用
这是我的代码
xmlBtn.buttonMode = true;
xmlBtn.mouseChildren = false;
xmlBtn.useHandCursor = true;
xmlBtn.addEventListener("rollOver",rollOverHandler);
xmlBtn.addEventListener("rollOut",rollOutHandler);
function rollOverHandler(event:MouseEvent) {
var rollOverBtn:xmlLinkButton = event.target as xmlLinkButton;
//fadeIn = new Tween ( rollOverBtn , "alpha" , None.easeOut , 1 , 0.5 , 25 , false );
rollOverBtn.alpha = 0.8;
// for now this line is only option for me but i want that text have tween
rollOverBtn.butonText.visible = false;
if (rollOverBtn == event.target ){
trace( rollOverBtn.source );
}
}
function rollOutHandler(event:MouseEvent) {
var rollOutBtn:xmlLinkButton = event.target as xmlLinkButton;
//fadeIn = new Tween ( rollOutBtn , "alpha" , None.easeIn , 0.6 , 1 , 25 , false );
rollOutBtn.alpha = 1;
rollOutBtn.butonText.visible = true;
}
任何想法?