A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Why won't this load?

  1. #1
    Junior Member
    Join Date
    Oct 2000
    Posts
    28

    Why won't this load?

    If I don't declare my variable as XML it traces fine:
    PHP Code:
    function init(){
        
    trace(myXML);
    }
    var 
    myXML = new XML();
    myXML.onLoad init;
    myXML.load("ads.xml"); 
    But if I declare it, it won't trace.
    PHP Code:
    function init(){
        
    trace(myXML);
    }
    var 
    myXML:XML  = new XML();
    myXML.onLoad init;
    myXML.load("ads.xml"); 
    Here is the xml file I'm loading
    PHP Code:
    <ads>
      <
    ad>
        <
    image>images/image1</image>
        <
    link>[url]http://www.site1.com[/url]</link>
      
    </ad>
      <
    ad>
        <
    image>images/image2</image>
        <
    link>[url]http://www.site2.com[/url]</link>
      
    </ad>
      <
    ad>
        <
    image>images/image3</image>
        <
    link>[url]http://www.site3.com[/url]</link>
      
    </ad>
      <
    ad>
        <
    image>images/image4</image>
        <
    link>[url]http://www.site4.com[/url]</link>
      
    </ad>
    </
    ads
    Can someone explain this to me?

    Thanks
    Tom

  2. #2
    Member
    Join Date
    Dec 2003
    Location
    Gurgaon, India
    Posts
    64
    Its tracing fine pal. Plz. refer the attached .zip file.

    Cheers,
    Sam
    Attached Files Attached Files
    Flash makes the Web go Round

  3. #3
    Junior Member
    Join Date
    Oct 2000
    Posts
    28
    I was working off of a network drive. I moved all my files to my local drive and it traces fine. I can't think a reason why this would matter. Thanks for confirming that the code was correct.

    Tom

  4. #4
    Senior Member tupps's Avatar
    Join Date
    Jan 2001
    Location
    Melbourne
    Posts
    2,035
    Security probably, oh don't we love it!
    Flash-XML FAQ
    http://www.tupps.com/flash/faq/

  5. #5
    Junior Member
    Join Date
    Apr 2001
    Posts
    10
    Flash doesn't like getting anything from a remote host. If the source files for the swf are on any other server then it just won't go get them.

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