hide side navigation
    5 most recent
    Web Services
    Library's
    Component's
    Applications
    Articles
  Flex form by email  Hello Remoting with AS3  AS3 Saving data from Flash  AS3 Loading data into Flash  Fire Effect  Contact form  Dragable buttons  Hello World with openamf  Loading helper classes  Upload with Flash 8  Transitions effects  Snapshot with Flash 8  Hello World Remoting AS2  Flash AS2 Remoting Connector  Saving data from Flash  Loading data into Flash  FlashCom & Remoting login  Cell Renderer API  Editing a table using remoting components  Flash MX2004 web service classes  Browsing a catalog  amfphp Documentation  Hello World Remoting  Online Store with AMFPHP  Flash clients for Web Services  Web Service Walk Though with NuSoap  Popup windows in flash with javascript  Installing Apache/PHP  MoreOver News Feeds  Load Edit Save Text Files via CGI  Save Movie Clip Postion via PHP and MySQL
 Read Full Documentation >> 

Loading data helper classes

By: Jorge Solis

Goals

When using back end stuff like database or just simply scripts that save files, use web services or Flash remoting, usually we are involved in the repetitive task of using different LoadVars objects to send and receive data. Once received, we parse and use it. I often get involved in this kind of task and decided to create some wrapper class to avoid repetitive code, and also simplify things. So this simply classes deal with external data: simple variables loaded trough a LoadVars object, data coming from web services or trough Remoting

The three classes implement a queue, so successive calls are dispatched in order, one after the other. This could be no the intention in some situations, so don't use this class if you want to load all at once (using multiple LoadVars object or Pending Calls when using web services or Remoting) In some cases, multiple calls could competes for bandwidth when using large results (some web services returns huge large XML documents or Remoting services large recordsets) so I usually try to resolve in order. The general idea is to make a call and pass a function as the receiver making the process shorter: one call, one function. This doesn't mean that you don't need to parse the results, since each case is different than others, but less code is necessary for the mechanism, and those not comfortable with LoadVars, Web services, Remoting (or just to type much like me) will be happy

Below three movies as example: on the left, one movie loading data using ten successive calls, on the right, a movie loading a list of web services offered by xmethods, and below them the HelloWorld   Remoting example using the remotingProvider class

 

LoadVars Web Service Remoting
Press load button Press load button Press call remote button

Here you can download the classes and the example files >>

Continue Reading >>