Groups | Blog | Home
all groups > flash actionscript > january 2004 >

flash actionscript : XML loading progress bar?


jason3d
1/25/2004 11:03:11 PM
I have a rather large xml file (229k) that I'm loading into my flash app with the MX pro, XMLConnector component. I've been trying to wire up an instance of the progressbar component to display the xml load progress but can't seem to figure out the right way to wire it up.

Has anyone here ever done something similar?

Carl Fink
1/26/2004 3:05:20 PM
[quoted text, click to view]

Not too complicated. You can get the percentage loaded using XML.getBytesLoaded() divided by XML.getBytesTotal(), and control the length of a rectangle using that. It's essentially identical to a preloader.
--
Carl Fink
Please respond only to the newsgroup.

jason3d
1/26/2004 10:34:17 PM
That would work for the XML object but I'm (trying) to use the XMLConnector Data Component that is in Flash MX 2004 Professional with the ProgressBar Component

The documentation on all of these new data components is very spotty. You would think that since they put all the work into building these 'Powerful' data components that they would have some property like getBytesTotal and getBytesLoaded??? Apparently not.

In my testing of the XMLConnector Data Component the data doesn't really stream into flash. When you call the xmlConnector.trigger(); the Flash play head STOPS, dead, halt, do not go any further, do not update the stage, nothing. The play head will stay stopped untill that data has finished loading. Since the playhead stops, (and it's not just the _root playhead, all movieClips playheads freeze as well.) there are no stage updates or options for any type of feedback to the user. In testing this with loading a 200+k xml file from the local drive it's a couple of seconds worth of screen freeze. I can't imagine how long it would be locked up if it was loading data from across the web, or on a slower machine. (Mine is over 2ghz with a gig of ram).

So it would seem that it will not be possible to use the XMLConnector Data Component AND give any feed back to the user on how long it will take the XML to load.

This seems like a pretty big oversite if you ask me. I've written my own XML data handlers but it's never fun to do. At first glance it looked like I wouldn't have to do things like that again with all the Data Components that came with MX 2K4. Looks like I'll still have to do it the hard way.

Carl Fink
1/27/2004 5:44:40 PM
[quoted text, click to view]

Oops. Sorry, I haven't used 2004 and didn't realize what you meant.
--
Carl Fink
Please respond to the newsgroup only.

jayfour000 NO[at]SPAM hotmail.com
1/30/2004 6:56:31 AM
[quoted text, click to view]

I am having the exact same problem. I agree with you on all points.
All I want to do is 'BIND' the loaded KB to the ProgressBar component.
Should be easy ... but it is not.

Any luck on your end? I will post back if I find anything out on my
own. I have a deadline fast aproaching, so I am sure I will find
'some' way to do it ...


AddThis Social Bookmark Button