03.05.2013 Views

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

FLASH® LITE™ 2.x - Adobe Help and Support

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

See also<br />

onLoad (XML.onLoad h<strong>and</strong>ler), loaded (LoadVars.loaded property), load<br />

(LoadVars.load method), sendAndLoad (LoadVars.sendAndLoad method)<br />

send (LoadVars.send method)<br />

public send(url:String, target:String, [method:String]) : Boolean<br />

Sends the variables in the my_lv object to the specified URL. All enumerable variables in<br />

my_lv are concatenated into a string in the application/x-www-form-urlencoded format<br />

by default, <strong>and</strong> the string is posted to the URL using the HTTP POST method. This is the<br />

same format used by loadVariables().The MIME content type sent in the HTTP request<br />

headers is the value of my_lv.contentType or the default application/x-www-formurlencoded.<br />

The POST method is used unless GET is specified.<br />

You must specify the target parameter to ensure that the script or application at the specified<br />

URL will be executed. If you omit the target parameter, the function will return true, but<br />

the script or application will not be executed.<br />

The send() method is useful if you want the server response to:<br />

■ Replace the SWF content (use "_self" as the target parameter);<br />

■ Appear in a new window (use "_blank" as the target parameter);<br />

■ Appear in the parent or top-level frame (use "_parent" or "_top" as the target<br />

parameter);<br />

■ Appear in a named frame (use the frame's name as a string for the target parameter).<br />

A successful send() method call will always open a new browser window or replace content in<br />

an existing window or frame. If you would rather send information to a server <strong>and</strong> continue<br />

playing your SWF file without opening a new window or replacing content in a window or<br />

frame, then you should use LoadVars.sendAndLoad().<br />

This method is similar to XML.send().<br />

The Flash test environment always uses the GET method. To test using the POST method, be<br />

sure you are attempting to use it from within a browser.<br />

Parameters<br />

url:String - A string; the URL to which to upload variables.<br />

target:String - A string; the browser window or frame in which any response will appear.<br />

You can enter the name of a specific window or select from the following reserved target<br />

names:<br />

■ "_self" specifies the current frame in the current window.<br />

LoadVars 373

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!