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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This method is used internally by the LoadVars.onData event h<strong>and</strong>ler. Most users do not<br />

need to call this method directly. If you override the LoadVars.onData event h<strong>and</strong>ler, you<br />

can explicitly call LoadVars.decode() to parse a string of variables.<br />

Parameters<br />

queryString:String - A URL-encoded query string containing name/value pairs.<br />

Example<br />

The following example traces the three variables:<br />

// Create a new LoadVars object<br />

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

//Convert the variable string to properties<br />

my_lv.decode("name=Mort&score=250000");<br />

trace(my_lv.toString());<br />

// Iterate over properties in my_lv<br />

for (var prop in my_lv) {<br />

trace(prop+" -> "+my_lv[prop]);<br />

}<br />

See also<br />

onData (LoadVars.onData h<strong>and</strong>ler), parseXML (XML.parseXML method)<br />

getBytesLoaded (LoadVars.getBytesLoaded<br />

method)<br />

public getBytesLoaded() : Number<br />

Returns the number of bytes downloaded by LoadVars.load() or<br />

LoadVars.sendAndLoad(). This method returns undefined if no load operation is in<br />

progress or if a load operation has not yet begun.<br />

Returns<br />

Number - An integer.<br />

366 ActionScript classes

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

Saved successfully!

Ooh no, something went wrong!