A Flash Developer Resource Site

Results 1 to 1 of 1

Thread: First steps, can't load externe file

  1. #1
    Senior Member
    Join Date
    Sep 2002
    Location
    Clogland
    Posts
    100

    First steps, can't load externe file

    /////Edit: found it
    ///// seems that I had to call the function without the "()"s
    ///// weird, but at least I know what was causing the trouble

    this gives a result

    PHP Code:
    var staticXML:XML = new XML("<modules><module><ID>1</ID><Module_title>name 1</Module_title></module></modules>");
    trace(staticXML.firstChild); 
    but if I put the xml in an external file (includes/modules.xml)and run this

    code:

    function init(){
    trace("xml loaded successfully");
    moduleXML.ignoreWhite = true;
    trace (moduleXML.firstChild);
    }
    var moduleXML = new XML();
    moduleXML.load("includes/modules.xml");
    moduleXML.onLoad = init(); /// *****should be "init;" not "init();"



    I get a big "null".

    ???? ????

    TIA
    Last edited by skalie; 03-23-2005 at 08:39 AM.

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