/* Run this file in the \First_Run\ActionsPanel\CustomActions directory to get a well formated FlashJavaScript documentation. To get a better impression of the code just save the output as a *.jsfl file and view it with the internal Actionscript editor. Have fun! aemkei@mizubitchy.com http://mizubitchy.antville.org/topics/FlashMX2004/ */ XML.prototype.ignoreWhite = true; var dat = new XML(); _global.hints = new Object(); dat.onLoad = function () { var topLevel; for (var i in this.firstChild.childNodes) { topLevel = this.firstChild.childNodes[ i ]; switch (topLevel.nodeName){ case "actionspanel": for (var ii = 0; ii < topLevel.childNodes.length; ii++) parse(topLevel.childNodes[ii]); break; case "codehints": for (var all in topLevel.childNodes) parseHints(topLevel.childNodes[all]); break; default: trace("// unknown nodeName:" + topLevel.nodeName); } } } function parse(node, tabCount) { var nextLevel, descr, snippet,obj; var prefix = ""; if (node.nodeName == "folder") { if (node.attributes.name != "Properties" && node.attributes.name != "Methods") trace(""); else prefix = "\t"; trace(newline + prefix + "//: " + node.attributes.name + " - \"" + node.attributes.tiptext + "\""); for (var ii = 0; ii < node.childNodes.length; ii++) parse(node.childNodes[ii]); } else { var temp = node.attributes.text.split("%").join("").split(""); if (temp.length < 40) temp.length = 40; snippet = temp.join("").split("undefined").join(" "); desc = node.attributes.tiptext.split("'").join("´"); obj = node.attributes.object; if (obj == "Function") obj = ""; trace ("\t" + obj + snippet + "\t // " + desc) } } function parseHints(node){ if (node.nodeName == "typeinfo") _global.hints[node.attributes.object] = node.attributes.pattern; } dat.load( "FlashJavaScript.xml");