« Using _over frame label for simple MovieClip buttons»

This is somthing i found a while back but it's something I found interesting at the time. If you create a movieclip button with the frame labels _off, _over and _down these will automatically be gotoAndStoped at when user interacts with the button without any actionscript. The only event I found you can't do like this is _out which you need to write AS for so all you need is :

Actionscript:
  1. testPB.onRelease = function() {
  2. };
  3. testPB.onRollOut = testPB.onReleaseOutside=function () {
  4.     this.gotoAndPlay("_out");
  5. };

And abracadabra you have a working button without having to define onRollOver or the frame the button goes to onPress. It seems as though this is very much like the button type as it has Up, Over, Down, Hit so maybe when you create a button in Flash what it actually does is use these frame labels (_off, _over, _down) in a MovieClip.

If you want the source example get it here