• Home
  • About
  • Contact Us
  • Gallery
  • Video
  • Archives
  • Site Map
Grab the RSS feed

FlashBannerOnline

FlashBannerOnline
  • Home
  • FlashBannerOnline
  • Free Downloads
  • General
  • Tutorials
    • Adobe AIR
    • CSS
    • Fireworks
    • Flash
      • ActionScript
    • FLEX
    • Javascript
      • JQuery
      • MooTools
    • PHP

Loading Text and XML with URLLoader in AS3

  • ActionScript, Flash, Tutorials

    Posted on October 22nd, 2009

    Written by Behrouz Pooladrag

    Related Posts

    • Sample Loading Text and XML with URLLoader
    • Using URLLoader to send and load Data to Server Used FLEX
    • Loading XML data using ActionScript 3.0

    Tags

    actionscript, AS3, as3 flash urlloader tutorial, as3 load text from php, as3 load xml urlloader event, as3 urlloader, as3 urlloader xml, as3 xml external class, external text with xml in flash, flash actionscript 3 xml text source, flash as3 loader xml class, flash script action 3 lightbox xml sample download, flash urlloader new xml, flash.net.URLLoader, Loading, reading xml using urlloader, simple as3 xml text loader, simple xml text loader flash as3 download, Text, URLLoader, urlloader as3, urlloader events external, urlloader flex communication php, urlloader in as3, urlloader in flash as3, urlloader on website, XML, xml external text loading in as3, xml text loader as3, xml with flash text
    Loading Text and XML with URLLoader in AS3

    In previous versions of ActionScript, there were a couple of classes who had the capability of loading external text, namely LoadVars and XML. The loading responsibilities of these classes has moved to one single class in ActionScript 3, URLLoader (flash.net.URLLoader). This class is a lot like LoadVars. The big difference is that it is used for XML since the responsibility of loading XML from an external source has been removed from the XML class. Instead, you would load the text with URLLoader and then give that text to an XML object for parsing.

    Like LoadVars, URLLoader has a load() method that is used to load text from an external source. This accepts 1 argument, a URLRequest instance (NOT a URL string). You can then use events from URLLoader to determine when the loading is complete. When complete, the text loaded is available in the data property of URLLoader.

    Example:

    var loader:URLLoader;
    // …
    loader = new URLLoader();
    loader.addEventListener(Event.COMPLETE, xmlLoaded);

    var request:URLRequest = new URLRequest(“file.xml”);
    loader.load(request);
    //…
    function xmlLoaded(event:Event):void {
        var myXML:XML = new XML(loader.data);
        //…
    }

    This entry was posted on Thursday, October 22nd, 2009 at 8:20 am and is filed under ActionScript, Flash, Tutorials. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

    You might also like

    Sample Loading Text and XML with URLLoader In previous versions of ActionScript, there were a couple of classes who had the capability of loading external...
    Loading XML data using ActionScript 3.0 Using XML is one of the best ways for structuring external content in a logical format that is easy to understand,...
    Using ActionScript 3.0 with PHP Loading External Variables Creating dynamic websites which combine the power of Flash or Flex with PHP is easier than ever with ActionScript...
    Writing Inline XML in AS3 In ActionScript 3, you can define XML variables using inline XML in your script. You don't even need to enclose...
  • 0 Comments

    Take a look at some of the responses we've had to this article.

  • Post a Comment

    Let us know what you thought.

  • Name:

    Email (required):

    Website:

    Message:

  • Ad Ad

  • FlashBannerOnline.Com

  • Subscribe

    Enter your email address:

    | More

  • Blogroll
    • Random Flash Banner!
  • Tag Cloud

    • actionscript addChild addEventListener Adobe AIR Air Animation AS2 AS3 as3 preloader Banner beginFill BitmapData blog.flashbanneronline.com Class CSS Date Class draw Flash flash.net.URLLoader flash banner free flash banner generator flash banner happy new year flashbanneronline FlashBannerOnline.com flash banner online free flash player function game getChildIndex Javascript lightbox Loading Mysql new year flash banner Object Optimization package PHP Sprite tot Tweener URLLoader URLRequest web XML
  • Recent Comment
    • Behrouz Pooladrag on Flash Optimization – Freezing And Unfreezing Objects
    • Valerie on Flash Optimization – Freezing And Unfreezing Objects
    • FlashLord on RSS Reader for FlashBannerOnline Blog!
    • Behrouz Pooladrag on Using ActionScript 3.0 with PHP Loading External Variables
    • LUN on Using ActionScript 3.0 with PHP Loading External Variables
  • RSS FlashBannerOnline
    • Happy New Year 2012 & Gift!
    • New Templates Oval Light Added to Flash Banner Online
    • FlashBannerOnline started in Arabic language
    • Happy New Year 2011
    • New Templates Christmas 2011 Added at Christmas!
    • New Templates angel animate Added to Flash Banner Online
    • Added Tow New Preloader (Pro Preloader , Rotate Preloader)
    • Happy New Year , by new Theme (Christmas 2010)
  • Add to Technorati Favorites

    Subscribe
  • Google
    Custom Search

Copyright © 2009 FlashBannerOnline - Powered by Wordpress.

FBO by