dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: preloading xml with setInterval

  1. #1
    noMad soon noir_8's Avatar
    Join Date
    Mar 2004
    Location
    Milan - Italy
    Posts
    139

    preloading xml with setInterval

    Hi guys,
    i'm trying to preload xml data.
    but it don't work and i can't clear the interval.
    any ideas?
    thanx,
    noir

    PHP Code:
    loadingXml = function(xmlObject) {     
        if (
    xmlObject.getBytesLoaded() == 0) {
            return;
        }
        var 
    loaded xmlObject.getBytesLoaded();
        var 
    total xmlObject.getBytesTotal();
        var 
    percent Math.floor((loaded/total)*100);
         
    trace(percent);
    }

    xmlObject = new Xml();

    xmlObject.onLoad(){
          
    clearInterval(ID);
          
    trace("xml data loaded")
    }
    xmlObject.load("test.xml");
    ID setInterval(loadingXml50xmlObject); 

  2. #2
    Senior Member stoc's Avatar
    Join Date
    Nov 2001
    Location
    Romania, Arad
    Posts
    428
    instead of :
    xmlObject.onLoad() (wrong)

    use :
    xmlObject.onLoad = function() (this is correct one )
    Stoc Digital Studio - Web Applications Development
    http://www.stoc-studio.ro

  3. #3
    noMad soon noir_8's Avatar
    Join Date
    Mar 2004
    Location
    Milan - Italy
    Posts
    139
    thanx, for reply.
    I made that little sintax error.
    bye
    noir

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