flex tabnavigator skin flicker

Posted by Proyb2 on Stack Overflow See other posts from Stack Overflow or by Proyb2
Published on 2010-04-10T10:30:33Z Indexed on 2010/04/10 10:33 UTC
Read the original article Hit count: 679

Filed under:

I am try to skin my tabnavigator with PNG, and extend with TabSkin.as and SelectedTabSkin.as, however, when I tried to mouseover, it will caused a flicker into black and load the tab image which I define. What can I do to avoid flicker?

TabSkin.as same as SelectedTabSkin.as but different image

package {
 import mx.controls.Image;

 public class TabSkin extends Image {
    public function TabSkin():void {
        super();
    }


    override protected  function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
        super.updateDisplayList(unscaledWidth, unscaledHeight);
    }

}

}

Tab.MXML

    TabNavigator {
       tabHeight: 39;
       tab-width: 108;
       tabOffset: 1;
       tabStyleName: "tab";
    }

    .tab {
         fillColors: #000000, #000000;
         up-skin: ClassReference("TabSkin");
         down-skin: ClassReference("TabSkin");
         over-skin: ClassReference("TabSkin");

    selected-up-skin: ClassReference("SelectedTabSkin");
    selected-down-skin: ClassReference("SelectedTabSkin");
    selected-over-skin: ClassReference("SelectedTabSkin");
    }

    .selectedTab {
         font-weight: bold;
         corner-radius: 0;
    }

<mx:TabNavigator x="223" y="82" width="100%" height="100%" id="tab2"/>

© Stack Overflow or respective owner

Related posts about flex