Download the files here.
TUTORIAL CONTENTS
  • Introduction
  • Flash/XML Syntax
  • Accessing nodes
  • Digging deeper
  • Power of Attributes
  • HTML and Text in XML
  • Making a Search Engine
  • Preloading XML files
  • XML/FLASH SITES AND TUTORIALS
  • Tupps web site
  • Flash 5 and XML
  • XML Table Constructor Kit
  • Using an XML file to load Chart components
  • Macromedia XML tutorial
  • Integrating XML and Flash in a Web Application
  • AUTHOR´s XML TUTORIALS/FILES
  • XML searchable database I
  • URLs and Asfunctions (II)
  • XML searchable database III
  • XML database Component
  • XML slideshow Component
  • XML scroller menu Component
  • Flash - XML Tutorial - The Basics

    By Joachim Schnier

    Preloading XML files

    One of the problems I encountered was when I used a button to load and at the same time parse the XML file, it worked fine on my harddrive but not on the server. Therefore, especially for large files it was necessary to preload the XML file first. I have provided a XmlPreloader component in the tutorial package and its action is shown here.

    You can preload up to ten XML files ore text (.txt) files. If you don't want to use the component create a movieclip and on a keyframe of the movieclip timeline put this script inside:

                                                   myXML = new XML();
                                                   myXML.load("myfilename.xml");
                                                   myXML.onLoad = function(success){
                                                         if(success){
                                                                trace(this.getBytesLoaded());
                                                         }
                                                   }
    
    The trace action will give you the bytes. And this is the end of the tutorial. If you want to see a more sophisticated version of this search engine check the XML database Component. Now if you find some some bug or mistakes which I made, let me know. Also I have not at all discussed the possibilities to use XML to communicate with a server. However, I have listed some tutorials in the sidebar, which are addressing this question and which you might find useful.


    PREVIOUS

    copyright © 2003 Joachim Schnier