I have 8 content plates, lets call them "states", as well as 8 navs at the top. These navs "call" the 8 various "states"
The goal is to have the current "state" slide out to the left and a new "state" slide in from the right when a nav is hit. This would apply to all navs / states.
One way to do it would be to do the 8 x 8 possible combinations of tweening between states possible- this is archaic [64 different ones!]
Instead I know there must be a way to do using variables. For example when "state 3" is up and you hit the 5th nav, some sort of Actionscript would querry which state is up [3], command that specific state [3] to slide left, and slide the newly selected state [5] in from thr right.
I know this sounds simple but I have done some AScript before I keep hitting walls here.
Can anyone be specific and provide details on a way to do this? I have been using if then statements and it is not working for me [if state=3 then gotoAndPlay("3out") etc...]
maybe you are using the wrong operator in your if statement?
1 equals sign is the assignment operator, 2 equals signs is a equality operator. you want to use == in an if stament like this:
if(state==3){
// do something
}
I will try out that solution. As you can see I have done some AS before but am not completely proficient. "Equality Operator" lesson learned!
Just a quick question before I start into it again... With the 8 possible states of the site is an "if then' scenario the best way to go about it, in the sense that there will be 8 if statements for each button...? There might be a more streamlined approach.... although if I can use if then it might be simpler for my puny AS brain
it worked with the if then's fine. Here is a simple test movie I was using and it works! instead of 8 there are only 3 in this movie but it will work the same....