Hi, i was wondering if anyone could look at this code and see why the alert component is crashing my movie?
Any Ideas??
Regards,
Martin
Computing Help And Info:
Code:
//
//button code
//
btnPost.onPress = function() {
//disable the buttons.
btnPost.label = "Submitting News...";
btnPost.enabled = 0;
sendInfo = new LoadVars();
receiveInfo = new LoadVars();
receiveInfo.onLoad = function() {
var theMsg = this.msg;
//enable the buttons.
btnPost.label = "Post News";
btnPost.enabled = 1;
//alert component
import mx.controls.Alert;
myClickHandler = function (evt) {
if (evt.detail == Alert.OK) {
trace("start stock app");
// startStockApplication();
}
};
Alert.show(theMsg, "News Posted Successfully", Alert.OK | Alert.CANCEL, this, myClickHandler, "stockIcon", Alert.OK);
};
sendInfo.newsTitle = _root.txtTitle.text;
sendInfo.newsBody = _root.txtNews.text;
if (_root.chkViewNews.selected) {
var VN = "Y";
} else {
var VN = "N";
}
sendInfo.viewNews = VN;
sendInfo.sendAndLoad('[URL unfurl="true"]http://mdma115.valuehost.co.uk/admin_postnews.php',[/URL] receiveInfo, "POST");
};
Regards,
Martin
Computing Help And Info: