Archive | October, 2005

Totally cracked me up!

26 Oct05

Make sure you don’t miss this one! Flash as a Superhero (nicknamed “Mesh”!). “They’re not very computer savvy - they just want to see some video online” almost made me fall off my chair !
(Via ColdHardFlash - a brilliant place to stay updated on Flash Animation!)

Re-opening a treeview after refreshing it

11 Oct05

Ever used a treeview-component for dynamic content? When the underlying data changes you send it off to the server and then update the tree with the result from the server. Problem is: all the nodes you opened are now collapsed… Wouldn’t it be nice to have the tree open to the state it was before the refresh? Here’s one way to solve it.

I’ve been working on our Flash-based CMS lately and I’ve bought the dndTreecomponent from Drumbeat. Brilliant component and features (slightly messy documantation, but workable). It’s a steal at $29 compared to the time it would take you to build something similar.It does it’s magic by extending the existing tree-component (class) in Flash with all the stuff you want like label editing and drag and drop. The problem with expanding nodes back after refreshing is that you may have changed the nodes so that when new data is returned from the server, you’ll open a different node since the numbering was changed or somewhat. In my case, I have unique ID’s on the server and by passing these via an XML node called “id”, I can use the XML idMap feature to access the nodes directly.

All I do before a refresh is parsing me back from the last open node, saving those ID’s. I put these into an array (nodesToOpen) and when the the new XML is loaded, I add a isOpen-attribute to the nodes that are to be opened:

for(var i=0;i<nodesToOpen.length;i++ ){
  var node = this.idMap[nodesToOpen];
  node.attributes.isOpen = "true";

I just love the idMap way of accessing XML. So fast, but as said, it requires unique IDs for every XML node. Then I parse through my XML and open nodes where required:

function recurseAndOpen(x:XML,tree:Object){
  if(!_global.xHowManyNodes){ _global.xHowManyNodes = 0; }
    for(var each in x.childNodes){
      if(x.childNodes[each].attributes.isOpen == "true"){
      var t = tree.getDisplayIndex(x.childNodes[each]);
      tree.setIsOpen(tree.getNodeDisplayedAt(t), true,false,false);
    // then recurse for all subnodes
    if(x.childNodes[each] != undefined){

// Send in the XML and the tree-object like this
recurseAndOpen(this.firstChild, main.rootObject.tree);

Figuring out this last bit took me way too much time so I’m posting it here for future reference and so that others may find it also. Once again, I got a hint at how to do things by finding gems in the comments on the Macromedia LiveDocs. I did not find it in the Flash 8 section but in the old MX04. Macromedia should really move the best of these comments over to the new docs just like does.

After a bit of fiddeling with what nodes to keep and not, I now have a treeview where the user won’t know that the underlying data changed. The refreshes and re-opening are totally invisible to the end user and that’s exactly the way I want it.

MAX is such a ripoff

05 Oct05

I’m not talking about Macromedia MAX - the conference that is just two weeks away. That will probably be a brilliant venue! I’m talking about Microsoft MAX - a blatant ripoff from Apple’s iPhoto. Having watched the Sparkle/Avalon presentation with Mano, I had really high hopes for the first publicly released (beta) software based on WinFX and the new architecture. I was SO disappointed!

During the Sparkle/Avalon video, one of the Microsoft employees giggle and says “I can’t believe I said that” after commenting that a gizmo he made looks just like the Apple nav-bar. The engineers appear to think it’s fun to be able to rip off others ideas in just seconds. Sure - it’s very easy to make such a navigation. I could probably code one in less than an hour using Flash. Everything is easy when someone first show you how to do it right, isn’t it? Duhhh…

I’m not a Mac user. I have a monster 5,5 kilo Toshiba P20 portable that I lug around. Like every computer user, I have a love/hate relationship to my machine and the makers of the OS and software. I enjoy the speed, the stability of XP and the amount of applications/games I get for the PC, so I won’t switch just yet. But being in the PC-camp, I’m sort of embarrassed at how much of Apple’s ideas Microsoft can steal and get away with. Microsoft MAX is yet another such thing.

Microsoft Max is sort of Apple iPhoto, but with only fractions of the features. MAX sports a slick 3D’ish look - almost alike what Apple have used the last years, but with a MS twist to it to avoid lawsuits. Aqua-like 3D buttons and brushed metal surfaces. They’ve ripped the smooth scaling of all images in the album, they way each image displays (with an extra white border that is - how creative?), a crappy slideshow with next to no settings and the sharing aspect. That’s about the features that are there. It’s truly sad to see MS developers raving about how cool the app is. It’s not cool at all. It’s a Beta, a poorly made ripoff and it looks more like an Alpha to me? The usability is so poor! I really hope MS does not intend to ship something like this. I’m an experienced computer user and after starting the slideshow feature, I used several seconds to find my way back.

MAX uses two arrows in the upper left corner as the main navigation in addition to a horizontal navbar-like thing. Having used a computer before is probably a drawback here, since they indicate that they may change the basic navigation metaphors we’re used to. Another funny thing: the app has those nice round corners that the design community is starting to grow tired. Flash users have made applications like this (and more creative) for many years already using third party wrappers/Projector tools. I’m downright disappointed. Even the Album functionality from iPhoto is ripped (and executed poorly). If you don’t have access to a Mac, here’s an image from my wife’s iBook showing iPhoto and all the features they ripped.

Who knows maybe the next feature they’ll add is a “rotate image-button” or maybe they’ll just rip the dead simple way you can order paper copies from iPhoto?  As a PC user, I’m ashamed…

Testing Slideshow Pro

03 Oct05

Testing the excellent SlideShow Pro component by Todd Dominey, using images from the Broken Saints DVD review I did some time ago:

Really easy to setup and use. Pretty flexible too. I’ll be testing ImageVue by Karl Ward later as well.

Starcraft in Flash?

03 Oct05

Not really, but a fun trip down memory lane. This version is only selected sound and graphic bits put together into a new “Starcraftish” game. I remember playing the original Starcraft so much that my girlfriend (now wife) thought I was insane. So many nights… Interesting to note that the game is still available in stores - 7 years (!) after the release. I guess good games never die, they just become cheaper?

I’m keeping my eye on Starcraft: Ghost (the follow-up). It has taken a really long time to get that game out. Blizzard is known for taking it’s time and with the success of WarCraft - they can afford it too. Blizzard have a totally different attitude than most other companies when it comes to shipping games. The last 3 games I bought was more or less unplayable without updates. That says a lot about how the gaming business work these days. Blizzard is an exception that actually finishes the games before shipping them, and that’s one of the reasons gamers keep buying their games. Latest news says Ghost will be released early 2006. It’ll not be anything like the original, but looks really good and it’s based on the same stories.

(from M4)