Chapter 13. Building a Code Library

[ LiB ]  

graphics/401fig01.gif

As your experience grows, it makes sense that you'll start recycling approaches and techniques that have proven useful. The best techniques are often the ones you developed on the job. In any event, the true craftspeople continually add to their toolsets. This chapter is dedicated to developing and maintaining your bag of tricks.

I tend to think it's more important to learn how to develop useful skills than just to be good at archiving them. Often something you find useful early in your career turns out to be not as useful as you grow to develop more skills. It's sort of like how you might be embarrassed of the clothes you thought were cool a decade ago. At least in my experience, I tend to look at my old projects the same way: "What was I thinking when I wrote that code?" For this reason, you want to be careful not to dedicate too much time-saving code for posterity and more time living in the here-and-now. Having said that, I find some tricks and code algorithms as useful today as the day I picked them up years ago. In this chapter, you'll learn how to "generic-size" code to make it transferable as well as learn techniques to store that code in a convenient form for easy access.

Specifically, this chapter covers the following topics:

  • Making your own simple components

  • Recognizing and addressing places to modularize your code

  • Saving code snippets as behaviors for quick access

  • The foundation of JavaScript Flash (JSFL) and "XML to UI" for writing commands that extend Macromedia Flash MX 2004

  • The basics of constructor functions, the prototype property, and class files

[ LiB ]  


Macromedia Flash MX 2004 for Rich Internet Applications
Macromedia Flash MX 2004 for Rich Internet Applications
ISBN: 0735713669
EAN: 2147483647
Year: 2002
Pages: 120

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net