MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Manuale Utente Pagina 85

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 172
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 84
82
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
LoadVars.contentType
myLoadVars.contentType
The MIME type sent to the server when you call the LoadVars.send() or LoadVars.sendAndLoad() method. The
default is application/x-www-urlform-encoded.
Availability
Flash Media Server 2
Example
The following example creates a LoadVars object and displays the default content type of the data that is sent to the
server:
application.onConnect = function(client){
this.acceptConnection(client);
var my_lv = new LoadVars();
trace(my_lv.contentType);
};
// Output to Live Log: application/x-www-form-urlencoded
LoadVars.decode()
myLoadVars.decode(queryString)
Converts the query string to properties of the specified LoadVars object. This method is used internally by the
LoadVars.onData() event handler. Most users do not need to call this method directly. If you override the
LoadVars.onData() event handler, you can explicitly call LoadVars.decode() to parse a string of variables.
Availability
Flash Media Server 2
Parameters
queryString A URL-encoded query string containing name-value pairs.
Example
The following example traces the three variables:
application.onConnect = function(client){
this.acceptConnection(client);
// Create a new LoadVars object.
var my_lv = new LoadVars();
//Convert the variable string to properties.
my_lv.decode("name=Mort&score=250000");
trace(my_lv.toString());
// Iterate over properties in my_lv.
for (var prop in my_lv) {
trace(prop+" -> "+my_lv[prop]);
}
};
The following is output to the Live Log panel in the Administration Console:
Vedere la pagina 84
1 2 ... 80 81 82 83 84 85 86 87 88 89 90 ... 171 172

Commenti su questo manuale

Nessun commento