right, been playing with the yahoo weather feed - which seems to come from the weather channel (http://www.weather.com) when i was dicking around with making a weather display on a clock that shows how long it is till my next holiday. ok, so this isnt data based aesthetics (well, it is in the most rudimentary sense) as such, but i was using it just as a bit of practice to be able to figure out the yahoo developer api. seems a bit weird though. admittedly i am not bothering with any pre-loader on this as it is tiny in size, which might be causing some issues, but the main thing seems to be the unreliability of the feed, or at least the speed in which it is "generated". firstly i was loading the XML myself, using as3 and so then handling all data when the document had finished loading, all logical enough especially with the ease that the new E4X xml handling in as3 gives you, but what i was getting was that sometimes the xml would load fully formed with all relevant data, but sometimes - the main shell of the xml would come through, but then missing a whole chunk of elements that held the information that i was wanting to use.
soo, i switched to using the supplied yahoo flash classes for talking to the yahoo service, which obviously should handle all the loading and whatnot properly (well, actually, it does it the same as i was, but just with more words) and have the framework set up and tested, but strangely, i got the same problem with this.
ok, so the documentation (apart from being a bit piss poor) for the as3 classes, says that it is made for use in flex builder 2 - which i wasnt using at the time, i was just implementing the classes myself in much the same way as flex would, but i cant see why that would create any major issues. the only things i can think that it might be is something to do with the cross domain policy (unlikely as it works sometimes, just not others), that the rss is being generated in two portions and so the actionscript gets confused when the first chunk has been loaded and thinks that it is done, or that there is some server thing that says you can only call the feed a certain number of times in a particular time period (so that they dont get people hammering their servers for free). but i have no idea where to start trying to figure this out.
it is probably me doing something wrong, but using the provided api classes doesnt really leave much room for going amiss there.
would be interested to know if anyone else has had the same issue when starting to use this service and if they did - whether they can kindly tell me what im doing wrong.
i want my bloody weather to work.
:(
/rach
Comments