hi guys
having a problem using the switch/case thingy in flash - i am trying to use it for navigation - setting a variable to a certain value, then the switch should check for the value i have set and then navigate to the right part of the timeline. only it’s not working. here’s my code:
switch (clicked) {
case "contact" :
_root.gotoAndPlay("contact");
break;
case "whoweare" :
_root.gotoAndPlay("whoweare");
break;
default :
trace("ouch");
}
i get the “ouch” trace whatever i click. i have set it up so that when the user clicks the ‘contact’ button the variable “clicked” is set to “contact” and same with the who we are button, sets it to “whoweare”… these are also the lables on the timeline. what i think is happening is that flash is just continuing to play the timeline as it goes to the ‘contact’ page always, the next thing on the timeline. would be grateful if someone could take a look at the file and tell me what i’m doing wrong…
http://myweb.tiscali.co.uk/murderkins/gv/gv05.fla
thanks!
emma.