-
conditions and variables
Hello
I'm working under as2 with variables in a web site navigation, i want to create a condition, a simple condition, for frame controling but i'm not sure how to code it.
I have the content_fade_out variable, whenever a user clicks a navigation button, the variable should be checked to see wich movie clip to play. I know i can do it with an if but, if i do it with a "if" I would need add 5 ifs to each button, while i think somethin like this can be done:
variable value = Y
y = 0
_root.home_mc.gotoandplay
y = 1
_root.galery_mc.gotoandplay....
and so on, I'm just not sure how to set the variable value condition.
Thanks forward for who shows up in help =)
-
Ryan Thomson
I suggest this. put your 5 if statements at the end of the fade out transition, then simply fill the variable on the button.
So if you have a contact button, in it's code you would just set the variable to 'contact'
this.contactBtn.onRelease = function(){
//goto the transition thing
whereTo = "contact";
}
then on the final frmae of the transition you'd having something like
if(whereTo == "contact){
//load up the contact stuff
}
if(whereTo == "something).....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|