|
|
Search Tutorials
Insert an 'evaluate' action(Esc+ev) and type in mess="Invalid password!". When you type the wrong password or you don't type anything you will be alerted that it's an invalid password. Insert another 'if' action and type in password=="tutorial" - now the password for the username "flashkit" is "tutorial".. I guess you've noticed that we need to insert another 'evaluate' action. So press 'Esc+ev' and type in mess="You forgot your username!". When you type a wrong username or when you don't type a username you'll be alerted that you forgot your username. For the end we must insert another 'if' action. Press 'Esc+if' then type in the text field the following: username=="flashkit" & password=="tutorial" then insert an 'evaluate' action and write in mess="Welcome " + username. By doing this the text typed in the variable 'username' is loaded in the variable 'mess'. If you want another final action, maybe a 'getURL'(Esc+gu) action, you must insert a 'getURL'(Esc+gu) action where you type the url and the target(' _self' specifies the current frame in the current window; '_blank' specifies a new window; '_parent' specifies the parent of the current frame; '_top' specifies the top-level frame in the current window.) but also the variable used(POST or GET). Here is the code: on (release, keyPress " Note: If you want to introduce another user you'll have
to modify a little the actionscript. Can you guess what are the changes. I'll
show you anyway. Here are the changes:
on (release, keyPress " We used the 'or' action. - condition1 'or'condition2
|
||||||||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||||||||
|