翻转/输出按钮(文本)不适用于补间

时间:2012-05-21 12:18:09

标签: actionscript-3 flash

这里我有一些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;
    }

任何想法?

1 个答案:

答案 0 :(得分:0)

可能是因为两个补间(rollOutHandlerrollOverHandler中)都有相同的值?

您是否嵌入了字体?