Object
Function description
Defines the value-passing object. You can use each method of this object to send and receive data. You can get some information in the process of downloading data, including error messages, progress confirmations, and streaming information. The role of the Loadvars object is very similar to that of some method in an XML object, the biggest difference being that the Loadvars object transmits data in the form of a data pair (name and Value pairs, meaning the variable name and content), XML objects, however, transmit data in the form of a DOM (Document object Model) tree.
Grammar
myloadvars= new Loadvars ();
Statement Example
Myloadvars=new Loadvars ();
Defines a myloadvars-pass object.
application Example
Script on the scene frame
Stop ();
LV = new Loadvars ();
Lv.load ("Data.txt");
Script on the button
On (release) {
if (lv.loaded = = True) {
NextFrame ();
}
}
Execution results
Click the button, the program will first determine whether the external variable value has been loaded, if the load will appear a new screen and display its value.