package import flash display MovieClip import flash events public clas

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
package {
import flash.display.MovieClip;
import flash.events.*;
public class Button extends MovieClip {
var snd:Sound;
var wtf:MovieClip;
public function HexaClock() {
this.addEventListener(MouseEvent.ROLL_OVER, function() {
if (wtf != null) {
wtf.gotoAndPlay("over");
}
});
this.addEventListener(MouseEvent.ROLL_OUT, function() {
if (wtf != null) {
wtf.gotoAndPlay("out");
}
});
/* BLAH - BLAH */
this.addEventListener(MouseEvent.CLICK, function () {
if (snd != null) {
snd.play();
}
if (wtf != null) {
wtf.gotoAndPlay("press");
}
});
}
}