【发布时间】:2010-04-02 17:57:01
【问题描述】:
我需要用两个按钮自定义我的警报框,并且两个按钮都需要有不同的皮肤。
我能够为一个皮肤做到这一点。但我无法弄清楚这两个皮肤。
我现在拥有的代码如下:
public function Messages():void
{
Alert.buttonWidth = 100;
Alert.yesLabel = "Accept";
Alert.noLabel = "Reject";
var alert:Alert = Alert.show("Accept video chat request from "+far_alias+"?", "Incoming Video Chat Request", Alert.YES | Alert.NO | Alert.NONMODAL, Sprite(Application.application), handleIncomingCallResponse, null, Alert.YES);
alert.data = cm;
alert.name = alert_name;
alert.styleName = "requestVideoAlert"
_alertDic[alert_name] = alert;
Alert.yesLabel = "Yes";
Alert.noLabel = "No";
}
Css 代码如下:
<mx:Style>
.requestVideoAlert
{
background-color: #000000;
back-color: #000000;
area-fill:#000000;
border-color:#000000;
dropShadowEnabled: false;
button-style-name: cancelbtn;
}
.cancelbtn
{
skin: Embed(source='assets/images/videoChat-cancel-button.png');
}
这使“接受”和“拒绝”按钮的外观相同
有人可以帮我解决这个问题吗?
谢谢 泽
【问题讨论】:
标签: apache-flex actionscript-3