Show69, is not about my coding standards, is about basic understanding of coding. And coding is usually very logic. U set a goal and then you try to find the meanings to reach that goal. For me 2 weeks is way to much for 5 lines of basic code which with the minimum of effort you can find either in flash help or in online tutorial, without knowing anything about actionscript.
But then again, that's just me; probably programming requires some other kind of logic, who knows. For example, i tried to teach my girlfriend some basic coding stuff, man it was hard. She was like a monkey, repeating everything she learned, but didn't use her thinking at all, even though i always repeat her to think first. So if i changed a bit the pattern, baaang, she got stucked.
Coding is pretty much like drawing. You think what you want to draw, you start drawing, link your drawings so that will be a whole, enhance something, adjust something else, until u get the drawing done.
I must confess, i'm not talented at graphics, it's hard for me to focus and visualize the big picture, so i usually inspire from other drawings. And doing that, i developed a decent eye for graphics. On the other hand, when it's about programming, then i can visualize the final application and then think it to the last detail. I guess it's about the way our brains are wired, but still we can learn new things even if we don't have the gift for that.
I guess you know now why i was a bit too rough with you.
@montyt: don't get upset, just ... read
But having a nested function costs. For each nested function, the outer function has to create an activation object which has some performance and memory impact.
Now what are these memory impacts? Whenever a function is executed a activation object is created for the call. In lay man terms it is actually pushing all the arguments, the return address on the stack. Thus an activation object stores all these things along with all the local variable declarations. Along with this a scope chain is also created that contains an ordered list of objects that Flash Player checks for identifier declarations. Thus each function has a scope chain property (internal property) associated with it. The scope chain goes up until it reaches the global object.
Coming back to nested functions, in case of such declarations not only there is an overhead of an extra storage for activation object, the increase in length of the scope chain increases the scope of the function and thus player’s job of scope-resolution increases which hurts performance.
Thus, next time your code execution can become really slow if you just don’t bother!!!
“True mastery transcede any particular art. It stems from mastery of oneself - the ability, developed throgh self-discipline, to be calm, fully aware, and complety in tune with oneself and the surroundings. Then, and only then, can a person know himself. ”