|
||||||||||||||||||||
| |
||||||||||||||||||||
| |
||||||||||||||||||||
| |
Guessing Game (Basic Level) |
|||||||||||||||||||
| 1. Open a new document by clicking on File -> New and make the document size 400 pxwidth X 200px height in the document properties dialog box. | ||||||||||||||||||||
| 2.
Make Two layers in the timeline , name the first layer actions and the
second one game. |
||||||||||||||||||||
| 3. Now make two buttons. Click Insert > New Symbol and create new bnutton. In the button editing mode of the first button, type "am i right" and on the second button, type "guess again". Hit F6 at the Hit state of Button, your Button time line should look like this: | ||||||||||||||||||||
| |
![]() |
![]() |
||||||||||||||||||
![]() |
![]() |
|||||||||||||||||||
| 4. Return to your main scene. On the "game" layer type in some static text on the first frame. | ||||||||||||||||||||
| |
||||||||||||||||||||
| 5.
On the first frame of game layer, make an Input text box.
Click this input text field and, in the Properties Inspector, give this
Input text field a Variable name of guess. Now drop an instance of the
"Am i Right" button from Window > Library (F11). |
||||||||||||||||||||
![]() |
||||||||||||||||||||
| 6. On the game layer, insert a keyframe on Frame 2. In Frame 2, create a Dynamic text field . Give the dynamic text field a Variable name of "answer". | ||||||||||||||||||||
![]() |
||||||||||||||||||||
| 7.
In Frame 2, drop an instance of the "guess again" button, and
in the Properties Inspector, give this button an instance name of "guessbutton".
|
||||||||||||||||||||
![]() |
||||||||||||||||||||
| 8. On the First Frame of Actions layer insert keyframe (F6), and display the Actions Panel (F9). In the actions toolbox, click Actions >Movie Control, and double- click "Stop". Click Frame 2 of the actions layer and repeat the process. |
||||||||||||||||||||
![]() |
||||||||||||||||||||
| 9.
On Frame 1 of game layer, click "am i right" button and
display Actions Panel or press F9. and add the following script: |
||||||||||||||||||||
![]() |
||||||||||||||||||||
| 10. Now we need to script the "Guess Again" Button. On Frame 2 of game layer click guess again button and display Actions Panel and add the following script: | ||||||||||||||||||||
![]() |
||||||||||||||||||||
| for Advance Guessing Game Click Here | ||||||||||||||||||||
| |
||||||||||||||||||||
Result: |
||||||||||||||||||||
|
||||||||||||||||||||