I am trying to push myself through one of tutorials on ActionScript 3. It's name is ActionScript 3.0 for developers and designers – Part 1: Creating a preloader. I've just wonder whether that's me or there is actually something wrong with this article. I hesitated a little, but couldn't resist to write about it so you may judge it yourself.
First thing, Jamie Kosoy is using code convention that makes my hair go gray. Below is the sample.
private function _onProgressBarComplete($evt:Event = null):voidI am almost sure this is not the recommended style for ActionScript 3. What the heck is with those $ and _ ?! Are those really that useful to understand code? You know what? When I read this source code I wondered whether those might some special variables, I had to check AS docs to clear it is just a convention. One thing it leads to is to ask useless question: what do those character mean? You have to be pretty sure that there will be questions about tertiary operator as well, and this function call on the of the line!
_isLoadComplete = true;
private function _animateOut():void
And the flow of article kills me of. Instead of going from start of program it goes the other way. You see on method there, another here. I know Jamie is senior developer and probably most of developers will understand this cliploader he is presenting. Including myself, but it is hard to read it this way.
Concluding I think this article should be revised to my liking! :))) That is:
- make all the special characters from variables go away (this would let me concentrate on the problem tackled in the article and not on wondering what those underscores and dollar sings might mean),
- rewrite the article so that it goes from top to bottom (this would present it the way source code is read - from application start. For this very clipLoader I would start from the code that actually loads the content and would drill down to details of passing the event to the timeline objects).