• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 12. Dealing with External Data a... > Using the LoadVars Class for Externa...

Using the LoadVars Class for External Data

Besides serving as a portal through which text file data can be sent and received, the LoadVars class can be used for communicating between a Flash front end and middleware. The middleware sends the requests from the front end to databases. Tables 12.1 through 12.3 provide an overview of the LoadVars class and its methods, properties, and events, respectively.

Table 12.1. LoadVars Class Methods
METHODACTIONS
LVinstance.addRequestHeader(hn,hv)In POST operations, this method changes or adds the http header with the provided header name (hn) and header value (hv).
LVinstance.getBytesLoaded()When the load() or sendAndLoad() method is invoked, this method returns the number of bytes currently loaded.
LVinstance.getBytesTotal()When the load() or sendAndLoad() method is invoked, this method returns the total number of bytes to be loaded.
LVinstance.load(URL)Variables downloaded from URL.
LVinstance.send(URL[,t,m])Variables from the LoadVars() instance are sent with an optional target frame (t) and a GET or POST method (m) to URL.
LVinstance.sendAndLoad(URL,lvO[,m])Variables from the LoadVars() instance are sent to URL, with loaded returning variables sent to the LoadVars() instance (lvO) with an optional GET or POST method.
LVinstance.toString()Automatically encodes in the MIME content code all the properties of the LoadVars() instance containing variable data.



PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint