[AS3] Optimization and Bad Practice Elimination
I've been following two books; Friends of ED: Foundation Game Design with Flash, and O'reilly Learning Actionscript 3.0 in order to learn how to program OOP games and apps correctly and with efficiency. I started months ago piecing together roughly 530 lines of code that animate platformer type movements smoothly and naturally. All the code does is animate a sprite's movements according to 5 keypresses.
up looks up, down ducks, left walks left, right walks right, and Z is a running key which changes the walking animations for each respective direction. I started working on the code about a year ago and put it down until recently and finished it recently. It's part of an ongoing project to make a platformer, so eventually physics will be added to this code.
I'm still consider myself a beginner with AS3 as I can only read and tweak relatively basic code. As of right now I don't know much syntax at all and I wouldn't be able to start coding, something strictly from memory, from scratch. However that is a considerable step forward from wanting others to write my code for me then just copy and pasting it in ;P.
Basically, to put an end to this wall of text, I need help not only optimizing the code, but also finding out what is being optimized and how to not make the same mistakes again. The SWF file is the first file on the list at sites(dot)google(dot)com/site/esiewertjr/flash-games. Apparently I can't post links, so you'll have to replace (dot), and the code will be in the next post, apparently I went over the character limit. ^^;
Just to point out, there are unimplemented things (like physics and the timer which will be used for the idleLong animation and things that won't be there in the final product (like the status testing at the end).
I appreciate any help. And if you are an experienced coder who'd be willing to kind of be a mentor, I'd love you skype info! xD