A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: canīt load XML-data into a loaded swf

  1. #1
    Hi there,

    my problem is:
    I made an swf that is loading data from an xml-file.
    standing alone it works fine, but when I used another swf to first load that xml-reading swf then nothing is happening anymore.

    xml isnīt read anymore after the swf isnīt on _level0 anymore...

    Code:
    _root.onLoad = function() {
    XMLobj = new XML();
    XMLobj.onLoad = loadXML;
    XMLobj.load("list.xml");
    XMLobj.ignoreWhite=true;
    };
    function loadXML(success) {
    var i, nodeObj;
    if (success) {
    and so on...

    What can I do to let it load even if this swf isnīt on level0?

    I tried this too:
    _level1.onLoad = function.....

    but nothing happens!

    Can anyone help me?

    Manuel

  2. #2
    Member
    Join Date
    Oct 2001
    Location
    Italy
    Posts
    51
    Hi!
    I would probably try to catch the variables while the loaded swf is steel in the loading one.
    Maybe in the onLoad function you could try to declare some _level0.variable1=myxml.firstChild.childNodes[0]....
    The important thing is to put the _level0. before the name of the variable, so you send it where it can be reached at any moment and from anywhere.
    I didn't try it but I think it should work. I hope so.
    Bye
    Carla

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