Search tutorials
Evaluating the Guess
Set the label to "Calcguess" Add a new keyframe and label it "EvalGuess", here we will evaluate the users guess by going through the following actions:
If (/:hmGuess <%gt%> /:Num)
Set Variable: "fback" = "Too High"
End If
If (/:hmGuess <%lt%> /:Num)
Set Variable: "fback" = "Too Low"
End If
If (/:hmGuess = /:Num)
Set Variable: "fback" = ""
Set Variable: "correct" = /:Num
Go to and Stop ("quit")
End If
The Quit frame will be made later and jumped to when the guess is correct, also displaying the correct number by showing the "correct" variable. As you might have guessed: hmGuess holds the players guess.
Insert a new layer, name it "Menu", as it will hold the two user-choice buttons, and a Stop option.
| » Level Advanced |
|
Added: 1999-12-20 Rating: 5.99 Votes: 498 |
| » Author |
| Peter is a twisted former teacher of English, who now only obeys the grammer of actionscript. He loves writing educational Flash pieces, and is known to enjoy reading actionscript poems by other authors as well. |
| » Download |
| Download the files used in this tutorial. |
| Download (11 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!