Ask a Question related to Macromedia Flash Actionscript, Design and Development.

  1. #1

    Default XML Loading Issues

    Question regarding loading XML into a Flash Document.

    I'm loading XML data into Flash, then upon success, sending it to another
    frame where it loads another ASP file containing a single variable called
    "feature." I run a test a few frames later to see if feature is loaded, if so,
    it sends it to the main frame where everything is thrown together.

    The problem I'm getting is on a slow connection (56K), it chokes upon
    importing the data and displays an error saying something like "Flash is
    running a script that is making this page run slowly, Abort Script?" Naturally,
    aborting the script allows the page to load sans data or code, so it just
    cycles through, otherwise, not aborting the script makes the page continually
    choke.

    Reload the page, and it works fine, so I'm assuming my issue is with importing
    the data.

    The code I have in the first frames are below, the site can be viewed
    [L=here]http://207.158.200.133[/L]. ([url]http://207.158.200.133[/url])
    Any help to what may be the problem would be greatly appreciated. Thanks.

    This is the code in frame 1:


    function testLoad(success){
    if(success){
    if(portfolio_xml.firstChild.lastChild.attributes.I D!=null){
    gotoAndPlay("load");
    statusVar=success;
    trace(success);
    }
    }else{
    gotoAndStop("error");
    }
    }

    var portfolio_xml:XML = new XML();
    portfolio_xml.onLoad=testLoad;
    portfolio_xml.load("http://207.158.200.133/includes/get_image_data.asp");
    portfolio_xml.ignoreWhite=true;

    __________________________________________________ ____________________

    Frame labeled "load":

    this.loadVariables("http://207.158.200.133/includes/get_feature_image.asp");

    __________________________________________________ ____________________

    Three frames later (frame labeled "check"):

    if(feature!=null){
    gotoAndPlay("run");
    }else{
    play();
    }

    __________________________________________________ ____________________

    Three frames later:

    gotoAndPlay("check");

    __________________________________________________ ____________________

    The frame labeled "run" contains the main interface.



    elliott_m Guest

  2. Similar Questions and Discussions

    1. Issues when loading Flash Player from Local Domain
      I have a webcam streaming to Flash Media Server via the Media Encoder. I have published the .swf file with the flash player and...
    2. File loading issues under OSX
      Has anyone had a problem loading external files on OSX? I have a project that requires the loading of a text file. It works fine both online and...
    3. loading MC loading text path question? link fixed
      Sorry my link to the files was bad before try this link 8) this is the code in the frame of the shell.fla //load Movie Behavior
    4. loading MC loading text question?
      I have a movie that I dynamically load text into the "bodyText" dynamic text field from a text file it works fine. However when I load that movie...
    5. PHP files not loading- html loading fine from the same folder!?
      I have IIS installed on a Win2000 Server SP4 platform. I have installed PHP V4.3.3 and phpBB forum pages. All is running fine except for one slight...
  3. #2

    Default Re: XML Loading Issues

    im off a t1 line and it gave me the slow script error and choked. my guess is that you have an infanent loop in there somewhere
    dk_says_hey Guest

  4. #3

    Default Re: XML Loading Issues

    there's no infinite loop in there. The only loops are test loops, and when they
    return false, they're told to try again. If there were an infinite loop, the
    site would choke every time. As soon as the data is in the cache, it works
    (which is why on a reload it works fine). I replaced the code in the first
    frame with a _root.onEnterFrame function and used a "XML.loaded" XML object
    rather than an XML.onLoad object, so it would be sure to loop constantly until
    it finally loaded and that produced the same issue. I'm running out of ideas.
    If you can see anything I'm doing wrong, any help would be greatly appreciated.
    Thanks. The new code is below.

    portfolio_xml = new XML();
    portfolio_xml.ignoreWhite=true;
    portfolio_xml.load("http://207.158.200.133/includes/get_image_data.asp");
    _root.onEnterFrame=function(){
    if(portfolio_XML.loaded){
    trace("it loaded");
    gotoAndPlay("run");

    }else{
    trace("not loaded yet");
    }
    }

    elliott_m Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139