The following piece of script monitors the order in which 3 buttons are pressed. Depending on the result an event can be triggered.
myArray = new Array();
a.onPress = function() {
i = "a";
myArray.push(i);
};
b.onPress = function() {
i = "b";
myArray.push(i);
};
c.onPress = function() {
i = "c";
myArray.push(i);
};
_root.onEnterFrame = function() {
trace(myArray);
if(myArray[0]=="a" && myArray[1]=="b" && myArray[2]=="c"){
trace("done");
delete _root.onEnterFrame;
} else if (myArray[0]!="a" && myArray.length==3){
trace("failure");
}
};