Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
myXML = new XML() myXML.ignoreWhite = true myXML.load("info.xml") myXML.ref = this myXML.onLoad = function(succes){ if(succes){ var root = this.firstChild nodes = root.childNodes for(var i=0; i<nodes.length; i++) { this.ref["tittel"+i].text = nodes[i].attributes.name subnodes = nodes[i].childNodes this.ref["bildet"+i].loadMovie(subnodes[0].firstChild.toString()) } } else trace("Error loading XML document") } bildet0._height = 150 bildet0._xscale = bildet0._yscale
This paste will be private.
From the Design Piracy series on my blog: