First, create a new movie and create 3 layers named right, wrong and start. On right put a key frame at frame 8 and name it rightpass. On wrong put put a key frame on 11 and name it wrong pass. You should now have 5 key frames. Put a stop action on each.
Now lock write and wrong to prevent mistakes. Highlight start frame 1 and click the text tool. Make sure the text field is pressed (this is under the paragraph and alignment). With the text tool click anywhere on your movie and then click the selection tool.
Note: there should now be a box in your movie. Right click the box and on variable change to pw and make sure password is selected.
Now for the button: draw any button and place it near the text field. Name the button trial. Now for trial's actions... do any on mouse event(ie release). Then choose the if option. And for the condition put: pw eq "pass" where pass = your password.
Next add a goto and stop and for frame label put writepass. Now add if with the else clause. Put else one above if then erase if. Now go to and stop lable wrong pass.
So you action script should look like:
On (Release)
If (pw eq "pass")
Go to and Stop ("rightpass")
Else
Go to and Stop ("wrongpass")
End If
End OnFor the final steps unlock write and wrong and on right pass type right on rightpass and wrong on wrongpass. Now you are done!
| » Level Basic |
Added: : 2001-01-09 Rating: 4.62 Votes: 188 Hits: 3580 |
| » Author |
| No information about the author has been given. |
| » Download |
| Download the files used in this tutorial. |
| Download (5 kb) |
discuss this topic to forum
