我正在开发一个 Flash 视频播放器,它有一个控制栏的默认皮肤。现在我需要做的是,用背景图像/颜色改变播放器的皮肤,主要是控制栏。有什么建议么
<mx:Button id="btnBuy" height="29" label="Watch Full Video" chromeColor="#B92420"
click="btnBuy_clickHandler(event)" color="#FFFFFF" fontFamily="Verdana"
fontSize="9" fontWeight="bold" paddingLeft="0" paddingRight="0"
skin="{BuyButtonSkin}"/>
皮肤文件
<!-- host component -->
<fx:Metadata>
<![CDATA[
[HostComponent("spark.components.Button")]
]]>
</fx:Metadata>
<fx:Script>
<![CDATA[
import controllers.DataController;
import mx.events.FlexEvent;
[Bindable]
[Embed(source='resources/images/ico-button.png')]
private var img:Class;
[Bindable]
[Embed(source='resources/images/ico-buy-hover.png')]
private var img2:Class;
[Bindable]
[Embed(source='resources/images/ico-button-wl.png')]
private var imgWL:Class;
[Bindable]
[Embed(source='resources/images/ico-buy-hover-wl.png')]
private var img2WL:Class;
]]>
</fx:Script>
<!-- states -->
<s:states>
<s:State name="up" />
<s:State name="over" />
<s:State name="down" />
<s:State name="disabled" />
</s:states>
<s:Rect left="0" right="0" top="0" bottom="0" >
<s:fill>
<s:SolidColor color="0x000000" alpha="1" />
</s:fill>
</s:Rect>
<fx:Style>
.backgroundImage {
fontSize: 18;
fontStyle: italic;
contentBackgroundColor: #FFFFFF ;
backgroundImage: Embed("resources/images/ico-button.png");
backgroundImageFillMode: repeat;
}
</fx:Style>
<s:BorderContainer width="100%" height="100%" styleName="backgroundImage" borderAlpha="0">
</s:BorderContainer>
<!--<components:ImageRepeatCanvas includeIn="up, disabled, down" width="100%" height="100%"
repeatDirection="horizantal" id="BuyNowBtn" repeatImage="{DataController.white_label? imgWL : img}"
dropShadowVisible.up="false">
</components:ImageRepeatCanvas>
<components:ImageRepeatCanvas repeatDirection="horizantal" id="BuyNowBtnHover" repeatImage="{DataController.white_label? img2WL : img2 }" width="100%" height="100%" includeIn="over">
</components:ImageRepeatCanvas>-->