• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 9. Recursive Approach > Event-Driven Code

Event-Driven Code

Looking back at our general XML display code, we see that the problems with our current design are glaring. It is procedural in all the worst ways. It executes sequentially rather than on events, and it elaborates itself through three handcoded levels of hierarchy rather than through infinite depths. XML does not follow such a limit. So we go again into the code and rebuild it from the inside out.

Return to our xmltrace code. We first restructure it as event-driven code, paralleling the work we did at the end of the last chapter. All of the xmltrace object is now a single frame (so is the base movie), and the active code is all packaged into the onLoad handler. In part, that function looks like this:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint