FWDœt•hÀ€IŒim”ÂãVg¦&«Actions for Scene 1: Frame 1 of Layer Name AS// Get the library #include "room_xmlQ.as" // Get the mesh mesh = new Object(); mxmlQ = new xmlQ("room_mesh.xml"); mxmlQ.xmlA.onLoad = function(){ _root.mesh = mxmlQ.parseMesh(); delete _root.mxmlQ; _root.play(); }; this.stop(); -(«D:\My Stuff\Flash\3d\room fla\room_xmlQ.as/* This is an experimental XML parser wrapper by Ed Mack. It is to save me time Constructor: new xmlQ() eXtensible Markup Language Quick (hehe) Since calling custom events isn't exactly easy, there is a bit of dirty work to be done by the flash script. (ASBroadcaster would require more script, so it wouldn't clean the process up :() Here's an example of using this object: mxmlQ = new xmlQ("config.xml"); mxmlQ.xmlA.onLoad = function(){ info = mxmlQ.parseConfig(); }; And, at the end of it, info is a fully parsed XML document, in this case, a set of strings. There is also a parseMap() method, which will parse an XML document specially formatted as a map */ function xmlQ(src){ this.src = src; // The XML source, ie "myfile.xml" this.loaded = this.load(); // Load me up snotty! } xmlQ.prototype.load = function(){ // The basic loader var loaded; this.xmlA = new XML(); // Load the XML loaded = this.xmlA.load(this.src); // Does the file exist? return loaded; // Tell the caller }; xmlQ.prototype.parseMesh = function(){ var i,j,a; var obj = []; var xmlAc = this.xmlA.firstChild.childNodes; // Get it's children for(i in xmlAc){ // Loop through them var node = xmlAc[i]; // Extract the current child if(node.nodeName != null){ // Filter out whitespace if(node.nodeName == "plane"){ obj.unshift({type:"plane",points:[]}); for(j in node.childNodes){ if(node.childNodes[j].nodeName != null){ a = node.childNodes[j].attributes; obj[0].points.push({x:int(a.x),y:int(a.y),z:int(a.z)}); } } } } } return obj; // Send back the object };p«Actions for Scene 1: Frame 2 of Layer Name AS// Get the engine #include "room_engine.as" mm3d = new m3d(200,200); mm3d.draw(); this.stop(); this.onEnterFrame = function(){ mm3d.rotate(5,5,0); mm3d.draw(); };Ði«D:\My Stuff\Flash\3d\room fla\room_engine.as/* My simple 3d engine... just bored (C) Ed Mack */ function m3d(x,y){ _root.createEmptyMovieClip("m3ds",1); this.screen = _root.m3ds; this.screen._x = x; this.screen._y = y; this.mesh = _root.mesh; this.pers = 270; this.pcount = 0; } m3d.prototype.draw = function(){ var i,a; for(i=0;i