
Global Functions
61
You can also use
GET
or
POST
for sending variables. The following example uses
GET
to append
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
POST
to send variables in the HTTP header. Make sure you
test your documents in a browser window, because otherwise your variables are sent using
GET
:
var firstName:String = "Gus";
var lastName:String = "Richardson";
var age:Number = 92;
getURL("http://www.macromedia.com", "_blank", "POST");
See also
loadVariables function
,
send (XML.send method)
,
sendAndLoad (XML.sendAndLoad
method)
getVersion function
getVersion() : String
Returns a string containing Flash Player version and platform information. The
getVersion
function returns information only for Flash Player 5 or later versions of Flash Player.
Availability:
ActionScript 1.0; Flash Player 5
Returns
String
- A string containing Flash Player version and platform information.
Example
The following examples trace the version number of the Flash Player playing the SWF file:
var flashVersion:String = getVersion();
trace(flashVersion); // output: WIN 8,0,1,0
trace($version); // output: WIN 8,0,1,0
trace(System.capabilities.version); // output: WIN 8,0,1,0
The following string is returned by the
getVersion
function:
WIN 8,0,1,0
This returned string indicates that the platform is Microsoft Windows, and the version
number of Flash Player is major version 8, minor version 1 (8.1).
Содержание FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE
Страница 1: ...ActionScript 2 0 Language Reference ...
Страница 1352: ...1352 ActionScript classes ...