To view a more robust example, see the login.fla file in the ActionScript samples folder. Here
are some typical paths to this folder:
Windows: boot drive\Program Files\Macromedia\Flash 8\Samples and
Tutorials\Samples\ActionScript
Macintosh: Macintosh HD/Applications/Macromedia Flash 8/Samples and Tutorials/
Samples/ActionScript
See also
onLoad (XML.onLoad handler)
(LoadVars.load method)
send (LoadVars.send method)
public send(url:String, target:String, [method:String]) : Boolean
Sends the variables in the
are concatenated into a string in the
my_lv
by default, and the string is posted to the URL using the HTTP
same format used by
headers is the value of
. The
urlencoded
POST
You must specify the
URL will be executed. If you omit the
the script or application will not be executed.
The
method is useful if you want the server response to:
send()
Replace the SWF content (use
Appear in a new window (use
Appear in the parent or top-level frame (use
parameter);
Appear in a named frame (use the frame's name as a string for the
A successful
method call will always open a new browser window or replace content in
send()
an existing window or frame. If you would rather send information to a server and continue
playing your SWF file without opening a new window or replacing content in a window or
frame, then you should use
This method is similar to
The Flash test environment always uses the GET method. To test using the POST method, be
sure you are attempting to use it from within a browser.
706
ActionScript classes
,
loaded (LoadVars.loaded property)
,
sendAndLoad (LoadVars.sendAndLoad method)
object to the specified URL. All enumerable variables in
my_lv
.The MIME content type sent in the HTTP request
loadVariables()
my_lv.contentType
method is used unless
parameter to ensure that the script or application at the specified
target
target
"_self"
"_blank"
LoadVars.sendAndLoad()
.
XML.send()
application/x-www-form-urlencoded
or the default
application/x-www-form-
is specified.
GET
parameter, the function will return
as the
parameter);
target
as the
parameter);
target
or
"_parent"
"_top"
.
,
load
format
method. This is the
POST
true
as the
target
parameter).
target
, but
Need help?
Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?