Central API Viewer

I was playing around with Flash MX Pro 2004 last night, and created this simple Central API viewer.


How much code did this take?

[code]var myTreeDP = new XML();myTreeDP.ignoreWhite = true;myTreeDP.load(“central.xml”);pBar.indeterminate = true;myTreeDP.onLoad = function(){myTree.dataProvider = myTreeDP;pBar.indeterminate = false;pBar._visible = false;}handleTreeEvent = function(evt){var node = myTree.selectedNode;XML.prototype.ignoreWhite = true;var x = new XML(“”+node.toString()+””);var n = x.firstChild.firstChild.attributes;var des;var fSig;if(n.isBranch == “true”){des = “”;fSig = “”;}else{des = n.tiptext;fSig = n.object + n.text;}description.text = n.tiptext;sig.text = n.object + n.text;}myTree.addEventListener(“change”, handleTreeEvent);[code]

Pretty simple stuff.

9 Responses to Central API Viewer

  1. really nice example … should convince a lot of guys out there …. the code is impressing ! thanks…

  2. laco says:

    this question is little off topic,i want develop central applications , can be central applications develped and tested without permanent internet connection?

  3. Vera says:

    Laco: Yes, they can be as long as your application doesn’t rely heavily on remote data. And if you want to test caching, you will WANT to be on and off the internet for testing. 🙂

  4. Justin says:

    Laco,Sure, you can develop your Central app on your local pc or mac without using an internet connection.Mike, can someone extend Flash 2004 to include the Central API viewer in the Windows > Developer Panels?

  5. Daniel Dura says:

    They sure can. As long as you are not accessing any outside web services, etc., the Central app can be developed locally.

  6. alessandro says:

    nice! I suppose it can be done for the whole reference xml’s? It would come in handy..

  7. Patrick H says:

    Why not convert it to a Central app so it will always be there to remind us as we are developing?! Just a thought.

  8. Louis Parsons says:

    that is the sh*t