这里我有一些xml按钮,当我想在当前按钮上做补间时,tweend对文本不起作用不知道为什么以及当我想从滚动当前按钮中删除事件监听器时它不工作
这是我的代码
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;
}
任何想法?
答案 0 :(得分:0)
可能是因为两个补间(rollOutHandler
和rollOverHandler
中)都有相同的值?
您是否嵌入了字体?