Archive of UserLand's first discussion group, started October 5, 1998.

XML in Director

Author:Steve Ivy
Posted:7/9/1999; 8:28:23 AM
Topic:scriptingNews outline
Msg #:8360 (In response to 8359)
Prev/Next:8359 / 8361

Director's XML support is pretty nascent... The docs are incomplete, or actually, incorrect. But once you get the kinks worked out, it's pretty easy to work with.

I actually haven't used Frontier's xml verbs much, so I can't do a lot of comparison, but in Director it woirks pretty much like any other language: you parse the xml, and you get back an oject containing an in memory representation of the tree. In Director's case, that's either a node that you can access using DOM-like commands, or a property list, that you access with the usual list commands. I find the DOM-style interface easier to work with, though I really missed useful utility commands like getElementList. (That's one I had to write myself).

Using XML for interface generation in Director really made me realize that as much as people complain about HTML as interface, HTML has one really cool advantage. The layout mechanics of the page are well understood. You stream the html to the browser, and it flows top to bottom, filling the window. In director, I spent a lot of time writing a layout engine, just to get the elements where I wanted them. HTML also has the benefit of a simple, elegent interactive model- hyperlinks. Director is much more cumbersome. With Director/Shockwave on the other hand, you can get cool effects, nice graphics, and the ability to go through a whole e-commerce purchasing process (for example) without ever leaving the page.

I think that using XML as a means of storing settings, preferences, etc. is going to be big. One of my coworkers is working on a real-time stategy game in Director, and I'm trying to get him to build in an xml-based customization engine. There's so much possibility here.

--Steve


There are responses to this message:


This page was archived on 6/13/2001; 4:51:20 PM.

© Copyright 1998-2001 UserLand Software, Inc.