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.

■ "_blank" specifies a new window.<br />

■ "_parent" specifies the parent of the current frame.<br />

■ "_top" specifies the top-level frame in the current window.<br />

method:String [optional] - A string; the GET or POST method of the HTTP protocol. The<br />

default value is POST.<br />

Returns<br />

Boolean - A Boolean value; false if no parameters are specified, true otherwise.<br />

Example<br />

The following example copies two values from text fields <strong>and</strong> sends the data to a CFM script,<br />

which is used to h<strong>and</strong>le the information. For example, the script might check if the user got a<br />

high score <strong>and</strong> then insert that data into a database table.<br />

var my_lv:LoadVars = new LoadVars();<br />

my_lv.playerName = playerName_txt.text;<br />

my_lv.playerScore = playerScore_txt.text;<br />

my_lv.send("setscore.cfm", "_blank", "POST");<br />

See also<br />

sendAndLoad (LoadVars.sendAndLoad method), send (XML.send method)<br />

sendAndLoad (LoadVars.sendAndLoad method)<br />

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

Posts variables in the my_lv object to the specified URL. The server response is downloaded,<br />

parsed as variable data, <strong>and</strong> the resulting variables are placed in the target object.<br />

Variables are posted in the same manner as LoadVars.send(). Variables are downloaded into<br />

target in the same manner as LoadVars.load().<br />

In SWF files running in a version of the player earlier than Flash Player 7, url must be in the<br />

same superdomain as the SWF file that is issuing this call. A superdomain is derived by<br />

removing the left-most component of a file's URL. For example, a SWF file at<br />

www.someDomain.com can load data from sources at store.someDomain.com, because both<br />

files are in the same superdomain of someDomain.com.<br />

In SWF files of any version running in Flash Player 7 or later, url must be in exactly the same<br />

domain. For example, a SWF file at www.someDomain.com can load data only from sources<br />

that are also at www.someDomain.com. If you want to load data from a different domain, you<br />

can place a cross-domain policy file on the server hosting the SWF file.<br />

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

374 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!