Blog

  • Central: Paging 1, onEnterFrame 0, while 0 + Tip

    Ok, have this seriously, insanely large XML file I’m parsing in my agent. I parse it, and then popluate the data to my LCDataProvider so anyone who wants some gets some.

    The while loop is kind of slow as the XML is huge, and it’s pretty rude if someone goes to/launches another app while my agent is chugging away.

    I then tried a process movie clip to cycle through each child of the XML using an onEnterFrame, and during each iteration, adding a small array to the LCDataProvider. However, the loop was slow enough to chug it to 1 fps about, and the DataGrid updated at the same rate… pretty lame even for a capped 4 items (hardcoded to test). I’m assuming this is because LCDataProvider is a syncronous LocalConnection plus the added overhead of modelChanged events getting thrown around.

    So, went back to my for loop (while, faster, I know, but it’s late…), and it’s faster overall, just more CPU. Now I can see why “paging”, as it’s called is the way to go. Besides, the data I’m displaying, resource data based on type + planet + galaxy… no one’s gonna want to look at a 100 itemed DataGrid anyway.

    People say don’t reivent the wheel, but I hate that. That’s the very reason I did so horrible in math in school… no teacher could explain why the hell I needed to know how to do this, nor why you did something the way you did it. Obviously, that shiot didn’t fly in Geometry or Trig. At any rate, by learning the hard way, I now have a great appreciation for paging, and will have to open up MX again to see how the RecordSet object does it for Flast Remoting, and hopefully, glean some applicational uses for the future.

    <b>Tip</b>
    Aside from my LCService mistake, another thing was I kept publishing Directly to the Central directory where it was installed. I forgot that the FLA saves that filepath you set in the File Publish settings, and I was uploading more than SWF’s (xml, php) to my server, so was wondering why everytime I reinstalled, I wasn’t seeing changes, until I put a text field on the stage, and didn’t see it… then I knew… 2 hours later. Just another gotcha to watch out for. Not to mention the fact that WS_FTP Lite wasn’t updating SWF’s that resided in a folder. …but hey, it’s free, right?

  • Central: RTFM

    Finally got the LCService object to work in my 2nd attempt at making a Central app. I was doing myService = LCService vs. myService = Central.LCService. Don’t know why I missed it, but in case your having probs, check that. It was in the manual inside of Flash’s help panel, although in a discreet place. Regardless, still my stupid fault.

  • Xmen/Mutant & Coding Analogy

    Another genius thought created while day dreaming in morning, Atlanta traffic.

    Xavier = Class
    Spiderman = Prototype
    Wolverine = ActionScript 2

    … I know, Spiderman isn’t from the X-men, but I couldn’t think of a mutant that was strictly genectically mutated and had no inborn mutant powers beforehand.

  • Clark 2004 Map v1

    Schweet! Not bad for about 14 total hours of work. Proof that components save you oodles of time. I utilized <a href=”http://www.blinex.com/”>B-Line’s</a> USA map for it. There are some usability issues with the window, but in the amount of time I had, I couldn’t implement some of my girlfriends text formatting or UI suggestions.

    At any rate, a big thanks to Mike Haggerty for the opportunity!

    Flash Map – <a href=”http://www.clark04.com/issues/turnaround/map/”>Wes Clark’s Turnaround Plan for Amercia</a>