So I’m fairly new to action scripting. Actually I’m as green as they come.
I tried to write out what I’m trying to accomplish but found it was easier to just grab a screen grab and label it, but I’m going to do my best to convey what I’m trying to do.
[CENTER]
[/CENTER]
Okay, So what I’m trying to do is get some fake functionality for a menu system. I’ve built a toggle so to speak for a player to ‘change’ the difficulty between ‘Lots!’, ‘Some’, and ‘None’. They can adjust it on either side of the setting with the arrows. The left make it go down, the right makes it go up. In theory I would take what I build for the left and then just make it work for the right … but all the left is doing is it changes it from ‘lots’ to ‘some’ and then just sits there.
I took the basic structure from a tutorial that I have since misplaced the url… I was thinking along these lines for the code:
'on the press of ‘dif_left’ (the button) check to see what the difTog is. If the value of difTog is difLots go to difSome, if it’s difSome go to difNone and if it’s difNone go to difLots. With each one mode setting the ‘difTog’ ready for any possible interaction. Or atleast thats how I thought of it. And each time the user clicks ‘dif_left’ it checks and goes to the proper difTog.
But it doesn’t work. And I don’t know what’s wrong. This is my code, it’s also the only actionscript being used.
var difTog;
var difLots;
var difSome;
var difNone;
function difDn() {
if (difTog == difLots) {
dif_value.gotoAndStop("some");
set(difTog,difSome);
}
else if (difTog == difSome) {
dif_value.gotoAndStop("none");
set(difTog,difNone);
}
else {
dif_value.gotoAndStop("lots");
set(difTog,difLots);
}
}
dif_left.onPress = difDn;
Any help would be awesome. Even a ‘hai! Your doing it wrong’ with that picture of the dog missing the ball. hehe silly dog… you missed the ball!