TitleWindow的CloseButtionSkin问题
TitleWindow的CloseButtionSkin问题
closeButton首先会被当做4个icon来解决,这样你必须创建4个icon,很麻烦
网上都是这样,不仅麻烦,且我认为影响性能,
mx:button是建一个,然后用标签stage :up,down来解决,
这个例子是用这个语句解决,看红色的字
<?xml version="1.0" encoding="utf-8"?>
<!-- http://blog.flexexamples.com/2007/12/31/changing-the-close-button-skin-on-a-flex-titlewindow-container/ -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
verticalAlign="middle"
backgroundColor="white" viewSourceURL="srcview/index.html">
<mx:Style>
TitleWindow {
closeButtonSkin: Embed(skinClass="BulletSkins");
/* Set values from defaults.css to null. */
closeButtonDisabledSkin: ClassReference(null);
closeButtonDownSkin: ClassReference(null);
closeButtonOverSkin: ClassReference(null);
closeButtonUpSkin: ClassReference(null);
}
</mx:Style>
<mx:TitleWindow id="titleWindow"
title="TitleWindow"
status="status message"
showCloseButton="true"
width="100%"
height="100%" />
</mx:Application>