Hi,
I am creating a full flash site and want to create a variable which will store which section/page the user is on. What code would I use to set the variable to something like “Home” and then what code do I need to insert in my buttons changing that value when they navigate to another section.
what i would do for that is in the first frame of the site set a global variable like;
[AS]
_global.WhereAmI = 0;
[/AS]
the number 0 would represent the fact taht the user is in the home section once the user clicke on a button you would then have this
[AS]
on(release){
_global.WhereAmI = 1;
}
[/AS]
the numbers would be changed consecutively to indicate what section the person is in
ths way if you wanted certina things to change based on the section you ca set up a switch statement
[AS]
switch(_global.WhereAmI = 1){
case 0: //i am in home
break;
case 1: //i am in section 1
break;
}
[/AS]
…so on an so forth