Created
February 24, 2009 02:53
-
-
Save besquared/69369 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Create new XML Object | |
clothing_xml = new XML(); | |
clothing_xml.ignoreWhite = true; | |
// Setup load handler which just invokes another function | |
// which will do the parsing of our XML | |
clothing_xml.onLoad = function(sucess) { | |
if (sucess) { | |
processClothing(clothing_xml); | |
} | |
}; | |
// Load up the XML file into Flash | |
clothing_xml.load('clothing.xml'); | |
// This is the function that will be called when | |
// our XML document is loaded succesfully | |
function processClothing(xmlDoc_xml) { | |
// xmlDoc_xml is now a reference to the XML | |
// object where our information is stored | |
for (a in xmlDoc_xml.firstChild.childNodes) { | |
trace(a + ' ' + xmlDoc_xml.firstChild.childNodes[a]); | |
} | |
} | |
/* | |
shirt.addEventListener(MouseEvent.MOUSE_UP, dragFnstop); | |
shirt.addEventListener(MouseEvent.MOUSE_DOWN, dragFn); | |
skirt.addEventListener(MouseEvent.MOUSE_DOWN, dragFn); | |
skirt.addEventListener(MouseEvent.MOUSE_UP, dragFnstop); | |
jumpsuit.addEventListener(MouseEvent.MOUSE_DOWN, dragFn); | |
jumpsuit.addEventListener(MouseEvent.MOUSE_UP, dragFnstop); | |
shoes.addEventListener(MouseEvent.MOUSE_DOWN, dragFn); | |
shoes.addEventListener(MouseEvent.MOUSE_UP, dragFnstop); | |
function dragFn(event:MouseEvent){ | |
event.target.startDrag(); | |
}; | |
function dragFnstop(event:MouseEvent){ | |
event.target.stopDrag(); | |
}; | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment