Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

alert component crashing flash player?

Status
Not open for further replies.

MJB3K

Programmer
Jul 16, 2004
524
GB
Hi, i was wondering if anyone could look at this code and see why the alert component is crashing my movie?
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");
};
Any Ideas??


Regards,

Martin

Computing Help And Info:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top