Ask a Question related to Macromedia Flash Actionscript, Design and Development.
-
elliott_m #1
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
-
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... -
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... -
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 -
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... -
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... -
dk_says_hey #2
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
-
elliott_m #3
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



Reply With Quote

