So You're a Flash developer..
Let Them Go!
All too often "Flash developers", I put that in quotes for a reason, tend to think the old methods work best. Why is this? Mostly due to the fact that these "Flash developers" are fairly new to the game. They were taught the old methods and its all they know. Here's a good rule of thumb, when a new version of Flash is relased the first thing I do is check for deprecated code. This is true with every language. As they progress, the older, slower, and bulky methods are left behind in favor of newer and more efficient ones. In Flash this is a serious issue. I see people ask questions like, "why does Flash give me an error when I use 'add'.." Its simple, 'add' is deprecated! You would have known this had you looked (sounds mean I know). There are a bunch of functions, methods, and operators that have been deprecated in Flash 8. For those wondering, here is a list I compiled :
Alrighty, now you have a list of deprecated syntax, so lets never use those again. With that said, though the following are not yet officially deprecated, we should avoid them all the same:
setProperty(), getProperty(), onClipEvent()
Just let that syntax go. Pretend it never existed and you're life will be so much easier. Here's simple Flash 'dont'. Dont ever use ClipEvents. They are old methods that dont apply anymore.
To Class Or Not To Class?
This is an interesting area when it comes to Flash and its developers. I see a trend of where developers are turning everything into a class. As we all know the class had many benefits and uses, but lets face it people, not everything is class worthy. I see this a lot, developer writes a class for a button, which contains the onRelease. All I can think to myself is, why? Why would you do that. To me, thats like strapping bricks to your shoes and trying to cross the street. I simply cant understand why developers do some of the things they do. Before you write a class, please oh please, consider if its necessary. If you're unsure, chances are it doesnt need to be a class.
Here's another little point to consider. Flash has become Object Oriented which offers so many benefits. Again, its also misunderstood and abused. A very simple truth, placing code in an external .AS file is NOT Object Oriented Programming. External .AS files simply offer better code organization. Again, it is NOT Object Oriented Programming, so please, stop claiming it is. This drives me completely insane when I see/hear other developers claim their application is Object Oriented when in reality its just an .AS file being imported. Understanding what Object Oriented Programming is will help you survive the ever changing Flash world. This also related to "knowing your tool".
Spread The Word
This article is part 1 of a 2 part series. Other articles in this series are shown below:
Better Design and Development Part 1