Flash as learning: New Loadvars defines the value-passing object

Source: Internet
Author: User
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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.