AS3 noob here. I am using the following code to successfully send a var to my php/database. My problem is that, of course, when I click my button in the Flash movie the browser navigates away to the "http://www.mydomain.com/charity.php?id=c" url.
function onPressHandlerc(evt:MouseEvent):void {
var url:String = "http://www.mydomain.com/charity.php?id=c";
var request:URLRequest = new URLRequest(url);
try {
navigateToURL(request, '_blank');
} catch (e:Error) {
trace("Error occurred!");
}
}
How do I set the navigateToURL() to not try to open a "_blank" window and just pass the var silently?
Thanks in advance for any help!
Ah think you actually want to use a URLLoader instead of navigateToURL for this case. navigateToURL is real similar to window.open in js if you're familiar, you want something more like AJAX I think which is where the URLLoader comes in.
http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/URLLoader.html