From time to time I read a tutorial trying to educate myself on programming, which is just my hobby so I'd like it to be nice and easy. I've read some java tutorials, skimmed through some C++' ones lately, seen some Scala's, Python's and so on. I am not calling myself an expert on that, I am far from that. I am just a average human.
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):void
{
_isLoadComplete = true;
progress_mc.removeEventListener(Event.ENTER_FRAME,_onProgressEnterFrame); _animateOut();
};
private function _animateOut():void
{
gotoAndPlay("OUT");
addEventListener(AnimationEvent.ANIMATE_OUT, _onPreloaderOut,false,0,true);
};
I 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
_animateOut() function call on the of the line!
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).
I am sure I will learn a lot from the article, but this could be even better experience for me. And how do you think?