In the following example,
myBtn_btn.onRelease = function(){
getURL("mailto:you@somedomain.com");
};
In the following ActionScript, JavaScript is used to open an alert window when the SWF file is
embedded in a browser window:
myBtn_btn.onRelease = function(){
getURL("javascript:alert('you clicked me')");
};
You can also use
variables to a URL:
var firstName:String = "Gus";
var lastName:String = "Richardson";
var age:Number = 92;
myBtn_btn.onRelease = function() {
getURL("http://www.macromedia.com", "_blank", "GET");
};
The following ActionScript uses
your documents in a browser window, because otherwise your variables are sent using
var firstName:String = "Gus";
var lastName:String = "Richardson";
var age:Number = 92;
getURL("http://www.macromedia.com", "_blank", "POST");
See also
loadVariables(), XML.send(), XML.sendAndLoad(),
320
Chapter 2: ActionScript Language Reference
is used to send an e-mail message:
getURL()
or
for sending variables. The following example uses
GET
POST
to send variables in the HTTP header. Make sure you test
POST
GET
XMLSocket.send()
to append
:
GET
Need help?
Do you have a question about the FLASH MX 2004-ACTIONSCRIPT LANGUAGE and is the answer not in the manual?
Questions and answers