| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Exit and Restart buttons
Hi there.
I've just finished a quiz game and my only problem now is the Exit and Restart Game buttons, so a player to have the change to choose either to close the program or to play again. Any ideas what code do I have to use for these two buttons? Thanks in advance. |
|
#2
|
|||
|
|||
|
not quite sure but try adding this code on you restart button;
Code:
on (release) {
gotoAndStop(*);
}
and "*" being the frame that your quiz starts at. and for the Exit button try this; Code:
on (release) {
fscommand("quit")
}
unloadMovieNum(0); if your going to upload the game to a site since fscommand("quit") quits the player. At least that's what i think Good luck Last edited by Banjo : May 5th, 2008 at 08:46 AM. |
|
#3
|
|||
|
|||
|
Banjo, thanks for the quick replay.
The Exit button works perfectly!! Concerning the restart code you propose, I’ve already tried it and it doesn’t work. It starts the game from the beginning but it doesn’t clear the player’s previous lifes, points etc. It’s something like the player continues to play from the point he stopped. Thanks again for your help. Drisos |
|
#4
|
|||
|
|||
|
Code:
on (release) {
gotoAndStop(*);
score = "0";
}
Try this one, 'score' being the Var name of your dynamic text(i guess that's what you are using as a score counter?) and some more that looks just like it e.x 'life = "100";' etc etc.. Hope it helps. good luck. Last edited by Banjo : May 5th, 2008 at 05:10 PM. |
|
#5
|
|||
|
|||
|
Thanks a lot, Banjo. It works fine!!!
|
|
#6
|
|||
|
|||
|
No problems, glad it worked out for you =)
|
![]() |
| Viewing: Tutorialized Forums > 2D Graphics > Flash > Exit and Restart buttons |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|