MACROMEDIA FLASH MEDIA SERVER 2-SERVER MANAGEMENT ACTIONSCRIPT LANGUAGE Manuale Utente Pagina 61

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 155
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 60
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
58
Returns
A boolean value indicating whether the write operation was successful (
true) or not (false).
Example
The following example writes byte 65 to the end of the
myFileObject file:
if (myFileObject.open("text","append")) {
myFileObject.writeByte(65);
}
File.writeln()
fileObject.writeln(param0, param1,...paramN)
Writes data to a file and adds a platform-dependent end-of-line character after outputting the last parameter. The
file contents are buffered internally. The
File.flush() method writes the buffer to the file on disk.
Note: The user or process owner that the server runs under in the operating system must have write permissions or this
call can fail.
Availability
Flash Media Server 2
Parameters
param0, param1,...paramN Strings to write to the file.
Returns
A boolean value indicating whether the write operation was successful (
true) or not (false).
Example
The following example opens a text file for writing and writes a line:
if (fileObj.open( "text", "append") ) {
fileObj.writeln("This is a line!");
}
LoadVars class
The LoadVars class lets you send all the variables in an object to a specified URL and lets you load all the variables
at a specified URL into an object. It also lets you send specific variables, rather than all variables, which can make
your application more efficient. You can use the
LoadVars.onLoad() handler to ensure that your application runs
when data is loaded, and not before.
The LoadVars class works much like the XML class; it uses the
load(), send(), and sendAndLoad() methods to
communicate with a server. The main difference between the LoadVars class and the XML class is that LoadVars
transfers ActionScript name-value pairs, rather than an XML Document Object Model (DOM) tree stored in the
XML object. The LoadVars class follows the same security restrictions as the XML class.
Availability
Flash Media Server 2
Vedere la pagina 60
1 2 ... 56 57 58 59 60 61 62 63 64 65 66 ... 154 155

Commenti su questo manuale

Nessun commento