Click to See Complete Forum and Search --> : BIG AMOUNT OF XML DATA MAKING FLASH CRASH....HELP

04-18-2001, 07:50 AM
I'm parsing a 68 to 150 kb xml document into flash for generating dynamic pop up menus...i get the flash alert message that says: "A script in this movie is causing flash player to run slowly....Do you want to abort this script?" I say no, I don't want to abort the script, and it works. The crash is happening when the xml object is created in flash and loads the xml file. My question is: is it possible that I get that message JUST because of the amount of data?
Thanks for any help

04-18-2001, 10:46 AM
If I remember correctly, I believe that error message comes up when there is a long internal loop within the script. More than likely it's occuring during your parsing script.

Take a good look at it and see if there are any errant loops or loops that are extended due to some variable value --

hollow planet design

04-18-2001, 03:00 PM
The best way to do this would be to parse lets say 15 nodes of the xml document each frame, basically you have a movieclip that has two frames, the first contains the code to parse 15 nodes and the second plays the first frame again.

This will stop the pop-up from displaying and will rid your movie of all jerks when loading big xml files!

To parse 15 or so nodes at a time, you will need to place all of the nodes into an array, as the node is parsed remove it from the array!

If you want some sample code let me know!

04-19-2001, 10:34 PM
I would say there are a couple of ways around this.

The flash xml parser is a DOM parser, that is, it is a document object model parser, which tends to be easier to work with syntactically, but slower because it needs to slurp up the entire xml document, turn it into a hierarchical tree, and then attempt to manipulate it.

I would agree with FlashGuru. Larger xml documents are going to take a long time, so breaking it up into different components might speed up the initial load of the movie.

As an example, say you have 3 dynamic popup menus. Rather than loading ALL the data for all of the menus, try creating seperate xml documents for each, and only loading them when you need them, rather than all at once when the movie loads. So, when someone clicks a button or makes a change in 1 pulldown menu, then load the new values from an xml document. It may make each successive change a tad slower, but certainly faster than loading all of them at the beginning.

Hope that helps

chris smith

04-20-2001, 12:34 AM
I don’t think that I have seen a problem so thoroughly and accurately diagnosed on a message board before. I guess I will throw in my experience – I kept having the same problem – I was loading all of my content and variables for an entire movie from one XML file because I didn’t want my client touching the actual FLA, and I really didn’t want them coming to me every time they decided to change the wording around or that a menu needed to slide out a little bit faster… Anyway, I was having the same problem when my movie would parse the XML file, and I found that simply splitting it up into two smaller files – one to take care of the technical variables (the speed that it slid out, etc.) and the other to take care of content related variables (text, links, etc.) fixed the problem. Again, since the file size was smaller, it wasn’t taking as long to parse it, and (I can only assume) that is what fixed the problem… either that, or through dumb luck, I did something else that fixed it… sometimes it works that way too.

-Charles Hinshaw