具体实施是这样来改造flash form的alert框的。
alert("Are you sure you want to remove all records?", "Warning", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler);
在controls中加入两个warning要用到的button,来对其进行改造,让本身一个按钮的alert变成两个,这个技巧是在ASFUSION上得到的灵感,如果我的flash as够熟悉的话,我大概可以做的更精彩些,所以还需努力, <cfsavecontent variable="showAlert"> var myObj = {}; var myClickHandler = function (evt){
if (evt.detail == mx.controls.Alert.OK){
alert("Records deleted","Completed"); }}alert("Are you sure you want to remove all records?", "Warning", mx.controls.Alert.OK | mx.controls.Alert.CANCEL, myClickHandler);</cfsavecontent>
<cfform name="myform" height="300" width="400" format="Flash" timeout="0" > <cfformgroup type="hbox">
<cfinput type="Button" name="myBtn" onClick="#showAlert#" value="Show Alert" />
<cfform name="myform" height="300" width="400" format="Flash" timeout="0" > <cfformgroup type="hbox">
<cfinput type="Button" name="myBtn" onClick="#showAlert#" value="Show Alert" />

收藏到QQ书签