Because of a recent question on the boards, I decided to make this quick tutorial. This example covers some basic aspects of Actionscript. It includes Arrays, for loops, basic functions, and some simple buttons. There are no requirements for this tutorial. I've used components because they do a good job of displaying the actions. Feel free to use any button or movieClip you want. If you don't use components, then you won't easily see the disabled state of the buttons but it will have no effect on the functionality.
As for the usage, it's very simple, just click and drag a button. You will see that the button you drag stays above the others and the others deactivate. I thought this might be a useful script for games or online applications that deal with draggable movieClips. It is very simple, but with a basic array and some simple functions, we can create a powerful script. Not only can you use this "as is", but it can be modified quite easily. Thank you and enjoy.
Here are the example files >> and here is our working movie.