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.

Comments

  1. October 24, 2003 5:05 AM
    really nice example ... should convince a lot of guys out there .... the code is impressing ! thanks...
  2. laco
    October 24, 2003 6:47 AM
    this question is little off topic, i want develop central applications , can be central applications develped and tested without permanent internet connection?
  3. October 24, 2003 10:20 AM
    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. October 24, 2003 10:21 AM
    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. October 24, 2003 11:47 AM
    They sure can. As long as you are not accessing any outside web services, etc., the Central app can be developed locally.
  6. alessandro
    October 24, 2003 12:20 PM
    nice! I suppose it can be done for the whole reference xml's? It would come in handy..
  7. October 26, 2003 6:33 PM
    Its very cool!
  8. Patrick H
    October 27, 2003 6:54 PM
    Why not convert it to a Central app so it will always be there to remind us as we are developing?! Just a thought.
  9. Louis Parsons
    December 28, 2003 3:15 PM
    that is the sh*t

Post a comment




Remember Me?

(you may use HTML and Quickcode tags for style)