Home arrow Flash arrow Page 3 - Working with external data in Flash
FLASH

Working with external data in Flash


Because data for a website comes in many formats, it helps to have a variety of ways to handle this data. This article covers the different methods available in ActionScript for exchanging data.

Author Info:
By: Adi Reddy Mora
Rating: 4 stars4 stars4 stars4 stars4 stars / 26
May 11, 2005
TABLE OF CONTENTS:
  1. · Working with external data in Flash
  2. · getURL(), loadVariables(),loadVariablesNum(), loadMovie(), and loadMovieNum() methods
  3. · LoadVars Class
  4. · MovieClipLoader class
  5. · XML Class
  6. · XMLSocket Class

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Working with external data in Flash - LoadVars Class
(Page 3 of 6 )

The LoadVars Class can be used in lieu of loadVariables() and loadVariablesNum() methods. It has three methods that use the HTTP or HTTPS protocol to send and load information in URL-encoded format.

This class was introduced in Flash Player 6 to provide a cleaner, much more object-oriented interface for the common task of exchanging data with a server or text files.

When compared to loadVariables() and loadVariablesNum() methods, LoadVars class has many advantages.

Example:

The following example instantiates a LoadVars object, assigns a couple of variables to it and sends those variables to a PHP page with http POST method.

var sample_lv:LoadVars = new LoadVars();
sample _lv.name = “Jhon”;
sample _lv.age = “36”;
sample _lv.send("setid.php", "_blank", "POST");

You can check the usage and advantages of LoadVars class at http://www.devarticles.com/c/a/Flash/The-Power-of-LoadVars-Object/, which gives you a clear picture of how to use it. 


blog comments powered by Disqus
FLASH ARTICLES

- More Top Flash Game Tutorials
- Top Flash Game Tutorials
- Best Flash Photo Gallery Tutorials
- The Top Flash Tutorials for Menus
- 7 Great Flash Tutorials
- Adobe Creative Suite 5.5 Now Available
- Critical Flash Vulnerability Heats Up the Web
- More on Nonpersistent Client-Side Remote Sha...
- Nonpersistent Client-Side Remote Shared Obje...
- Using the Decorator Pattern for a Real Web S...
- Using Concrete Decorator Classes
- Delving More Deeply into the Decorator Patte...
- The Decorator Pattern in Action
- A Simple Decorator Pattern Example
- Decorator Pattern

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 5 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials