Ditto (is that what you’re supposed to say? ) I’d definitely appreciate anything you could write about XML, eve though I have eventually found some ressources. And don’t ask me what you should talk about, I wouldn’t know
And one more thing, David/Upu is writing something on the subject, so maybe you 2 should discuss it a tiny bit.
That’s mighty kind of you. I’ll be sure to pass it to you first for editorial review. That would be very very helpful. There are still so many things I’m confused on.
Question. Have you been doing a lot of work with xml in Flash?
if so I have some questions already.
A) Do you make two functions one for striping the white from an xml and another for sorting out the data for display?
B) How big is too big for an XML file. I’m having a hard time distinguishing exactly how long they take to load from the server.
C) I know that the really large ones can cause a total freeze for quite a few seconds while your parsing the data. Are there any tips for reducing this freeze time?
Those I think are my big three questions right now.
well - i guess that the answers depend mostly on what version of Flash you are using.
The Flash MX XML parser is a trillion times faster than that of Flash 5. No comparison. In flash 5 you need to use XMLNitro - in MX- there is no need. So the worry about huge XML files is not a big of a concern with MX-- Ireally have no response to how big is too big- I guess that comes down to testing and determing how long is too long and then breaking the XML into digestable chunks.
If coding in Flash 5- i use a handy strip white space function from Colin Moock (www.moock.org). In MX-its a simple command(
theXMLOBJ.ignoreWhite = true;)
Then I add a function that overrides the onload function - it parses the data and makes objects out of them - adding these objects to an array or series of arrays- however I need to do it - so that they are easily referenced.
I have done some stuff in XML- I really try to integrate it somehow into most of the stuff I do. I recently did a quiz that got its content, answers, question types, navigation structure from parsing an XML file.
XML is an investment- it takes a bit to get going with it - but once you do - it adds incredible flexibility.
I think I answered all the questions?!
AND HEH - lost in beta- I gave up on my stupid html display prob- I ended up going with the listbox component instead and liked the results- thanks for your help!
Sorry I couldn’t help more with that problem. Hmm, I was hoping using a textbox format would fix it. Since all other methods didn’t seem to work. I am glad you came out with a result that you liked though. I would have posted to that thread for months if I had to just so I can help you fix the problem (I posted in one thread that got up to I think 70 some posts trying to fix a problem, it was a thread where all the posts up until right before the end were just me and the other guy).
ok… what I’ve been doing so far is using a single function first on the object to stripwhite (colin moocks as well. It’s a great piece of code) then I’d use a second function (modified from the stripwhite function) which takes the data and creates movie clips or whatever to display the data.
I guess you feel it’s worth populating an array with the information, but I’m not sure why… yet.
It is possible that because I’ve been using Flash5.0 I’ve been forced to keep my xml files fairly small in size. This in turn dictates that I have a number of xml objects in any project at the same time, and that means that though my freeze time is low (I didn’t even know about that program you mentioned.) I can retreive the info as I need it, from sort of arrays… (since XML node trees do share some of the same properties.)
I could see however… that I would be going through the xml less times if I took each branch and populated separate arrays with that information… I’ guess I’ve got some playing around to do still.
I would say, from what you’ve said so far, that YOU should be writing a tutorial on the subject… at least as far as MX goes. All I can give them is 5.0 code which A) may or may not work in MX, and B) is slower when it does work. What do you say… would you give it a go?
The XML nitro is a routine developed by Branden Hall of Figleaf :
you can get it here:http://chattyfig.figleaf.com/
select XML nitro on the right hand side.
also- Flash 5 and MX deal with MX the same - so your code will be portable! Only difference is that in MX you don’t need the strip white space function and the XML Nitro. But you can use it if you want - its just not essential.
Actually I am doing the XML bit right now! I kinda got motivated while procrastinating…
And on that same tangent - I meant to do a drag and drop component and then i started making a font viewer… so much for staying on target… But I will do the drag and drop. Loved your tornado bit - by the way-- wanna tutor me in math?