Passing Variables - How??
Hi everyone. I've got 2 scenes, the first one is the menu, where the user can press the left or right keypad to move a character to level 1, 2 or 3. when the character stops under each level, i have used the
'onClipEvent(enterFrame)'
code to trigger an animation. so basically, whichever menu option the character moves to, that specific menu option will animate.
On the next scene, which is level 1, at the end of it, i have coded it to go back to the main menu. The problem i'm having is that obviously when the user has come to the end of level 1, it means they have completed it. so when they go back to the main menu and make the character walk and stop under the level 1 menu option, it shouldn't animate. i tried making a variable at the end of level 1 with this code;
'level1 = "completed";'
and then on the code on the level 1 menu option on the main menu, i rote the code
'onClipEvent(enterFrame){
if(level1 == "completed"){
stop();
}
else{
play();
}
}'
This however doesn't seem to work. Because even though level 1 has been completed, the user can still make the character stop under the level 1 menu option and seee it animate. CAN ANYONE PLEASE HELP ME OUT HERE AND TELL ME WHAT I AM DOING WRONG??? that is if i haven't confused the hell out of you! :yikes: