Xml

Very nice link. I will check that out. And good idea about colaborating with david on XML tutorials.

PS: Ilays, ditto is what to say when you mean ā€œsame hereā€. So yes, you used it right.

heh david ā€“ if need some help with the XML tutorial or what not - let me know!

Iā€™m more than happy to help with it.

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.

Hey david,

If it helps at all, I did 2 functions. 1 for whitespace stripping and 1 for sorting the data. But what do I knowā€¦haha:)

heh david

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!

Cheers.

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).

Back on subject, good info:)

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?

sure thing! -

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.

You should see a big difference!

k - I will do something for Flash MX XML -

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. :slight_smile:

Yipee!! :slight_smile:

Thanks. I myself could use some tutorials on the subject.

This code is Flash 5 specific so it makes sure that the user has only a Flash 5 plugin.

Is this leading me to believe that if a person has the Flash 6.0 plugin this script will not workā€¦ or is just implying anything below 5.0?

Hey Mediachickie, did you manage to do anything?

pom :slight_smile:

i will do something tonight and post it ā€“ been so busy !!!
Thanks for the reminder!

Hey, I donā€™t want to rush you or anything :slight_smile: Especially if you have other things to doā€¦

pom :asian:

no - i need the pressureā€¦ otherwise I half finish things- like my component! No worries!:slight_smile:

OK now get this done right now!!

Oh and I meant to tell you: I have 1 little problem with my component. Nothing important but itā€™s not ā€˜perfectā€™ yetā€¦

pom :stuck_out_tongue:

yeahā€¦ i feel better!:slight_smile: I meanā€¦ thatā€™s okayā€¦:wink:

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ā€¦:slight_smile: But I will do the drag and drop. Loved your tornado bit - by the way-- wanna tutor me in math?:slight_smile:

question:
do people need to know right from the basics - such as the keywords associated with XML - or just hereā€™s and XML file and here is how you parse it ?

I think we would need both. But Iā€™m only interested in the parsing bit :slight_smile: I mean, anybody can check any tute about XML to learn the lingo.

Thanks for the tornado. And I am working about a tutorial that is supposed to teach how to use trig functions in AS. I have no idea where to start thoughā€¦ Any thought about that?

pom :asian: