|
-
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!
Last edited by realest639; 07-02-2005 at 02:27 PM.
Reason: make title bold
-
hi, can anyone help me with this problem? i know it's a really simple solution, i just can't figure it out!
-
ok, i new it was just a simple bit of code! i've done it now.
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
|