A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 23 of 23

Thread: I don't get my flash movie to read XML data

  1. #21
    Member
    Join Date
    Jul 2003
    Posts
    79
    No, I've just tried using my browser with the SWF embedded, and doesn't work either. It's not anything about the Flash environment then, because it happens in HTML as well.

  2. #22
    Member
    Join Date
    Jul 2003
    Posts
    79
    problem definitely solved! or so I believe.

    The "mystery" was here:
    PHP Code:
    news = new XML();
    news.ignoreWhite true;

    news.onLoad = function(success) {
        if (
    success) {
            
    trace("NEWS: " news);
            
    myText.text "NEWS: " news.firstChild
        } else 
    trace("Couldn't load XML data");
        
    // Actions to place news...
    };

    // Although news.php is in the same folder as the flash movie, I have to call it using the http protocol so as to force news.php to be interpreted by PHP engine.
    news.load("http://localhost/...mypath.../news.php"); 
    In the last line, I was calling directly news.php without forcing it to be interpreted by PHP. By adding http://localhost/...mypath.../ to the path of function XML.load(), I get, AT LAST hehe, what I intended to do.

  3. #23
    Student
    Join Date
    Apr 2001
    Location
    -
    Posts
    4,756
    well that´s half of the solution,- of course one would need to fix that if it´s going to be uploaded- but thx for that info.
    I guess I myself will further on write a method that switches from local to online with a prefix on all loaded php thingies.

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