flex tabnavigator skin flicker
- by Proyb2
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"/>