View Full Version : multi function buttons
jpthetall
11-13-2005, 02:34 PM
i have been looking at the tutorials and i now know how to make a simple button that has one function, but i can't find anything about a button with more than one function. i am trying to make a button that will three or four function and you can select what function you want by rotating the button. if someone knows how to do this i would be very appreciative:)
hi and welcome to As.Org
_mc.onPress = function() {
if (!this.State) {
this.State = 0;
}
switch (this.State) {
case 0 :
A();
break;
case 1 :
B();
break;
case 2 :
C();
break;
case 3 :
D();
break;
}
this.State = ++this.State%4;
};
function A() {
trace("I am function A");
}
function B() {
trace("I am function B");
}
function C() {
trace("I am function C");
}
function D() {
trace("I am function D");
}
jpthetall
11-13-2005, 09:20 PM
thanks so much for your help. that worked great
now i hate to sound like a complete n00b but i am. is there a way to make my button rotate when you click on it. my ultimate goal is to have a button that has at least three functions on it and when you click on it it will rotate in one direction and do something, click it again to do something else. the reason i want it to rotate is so that the user can see what function is selected at any given time. i hope this makes sense. thanks for all your time
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.