Explanation of scope and good practice wanted

Hello people,

My first post here so be kind to me :slight_smile:

I’ve been in and out of flash and actionscript for quite a while, but never had the time to properly get into it. As I’m now starting a slightly larger project, I thought it be a good idea to get off on the right foot.

I’ve sorted most of my code into a variety of functions. But I’m struggling with where to place all the code to have access to variables at the right places. Like declaring and populating an array in one function, and then wanting access to that array outside of the function and inside other functions. Sooo; if anyone can do a quick explanation or point me to the right places, I’d be over the moon. :p:

And one more question; does anyone know of a good resource/tutorial to animating with actionscript 3.0. Not all the tweening classes etc, but a basic how to “first this comes in, then this happens, then this …” etc. Just how to time actions and make them appear at the right times…

Thanks a bunch anyway! Any help is appreciated!

Cheers,

Øyvind