A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Pre load xml attributes before appearing... trying again:(

  1. #1
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367

    Pre load xml attributes before appearing... trying again:(

    So I have this code.... can anyone suggest some augmentation on the code so that I can have a condition that tests that all the attributes are loaded before showing all of them at the same time...

    Code:
    var xml:XML = new XML();
    xml.ignoreWhite = true;
    xml.onLoad = function() {
    	var nodes = this.firstChild.childNodes;
    	numOfItems = nodes.length;
    	for (var i = 0; i<numOfItems; i++) {
    		var t = home.attachMovie("item", "item"+i, i+1);
    		t.icon.inner.loadMovie(nodes[i].attributes.image);
    		t.r.inner.loadMovie(nodes[i].attributes.image);
        }
    }
    Thanks in advance.

  2. #2
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    tests that all the attributes are loaded

    onLoad is invoked when an XML document is received from the server
    onData is invoked when XML text has been completely downloaded from the server
    loaded indicates whether the XML document has successfully loaded

    you can also make use of the -
    XML.getBytesLoaded and XML.getBytesTotal methods

    all this info. is in the Help Files
    Last edited by a_modified_dog; 03-24-2007 at 07:02 PM.

  3. #3
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    wow... gonna check it out now.... ill be back!

  4. #4
    Senior Member
    Join Date
    Jan 2003
    Location
    New York/London
    Posts
    367
    awww.. this only seems to test if the XML Document ha downloaded etc... it does seem to check on the loading status of the images referenced by the XML what am i missing?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center