View Full Version : [FMX] login system


Sphere
08-25-2003, 03:47 AM
we gonna make a loginsystem.
when u insert hte right username and password u can enter a site

1. start with a new document
2. make two text boxes with the text tool
3. we gonna set the properties of the textboxes
if u can't see the text properties go to windows>> properties

select the first textbox and give it the next props:
"Single Line", "Border" and by the variable type "name"
just like beneath
http://members.lycos.nl/zandbergenb/tut/login/prop1.bmp

now select the second text box and choose by props this:
instead of single line u choose "password" and as variable use "pass"
http://members.lycos.nl/zandbergenb/tut/login/prop2.JPG

4. choose insert>>symbol and choose button and make a button
i made this:
http://members.lycos.nl/zandbergenb/tut/login/button.JPG

5. choose the library by hitting ctrl+L and drag the button on the stage
6. select the text tool and make a text in front of the 2 inputboxes with "name"and "password"
http://members.lycos.nl/zandbergenb/tut/login/result.JPG
7. select the button,hit right mousebutton and choose properties
8. past this in the actions panel:


on (release) {
if (name=="kcrew") {
if (pass=="werule") {
getURL ("http://cheetah.users.whitehat.dk/");
} else {
gotoAndPlay (2);
}
} else {
gotoAndPlay (2);
}
}


you can change the password and username and the url if you want

9. now insert a new keyframe @ frame 2 and make the text "wrong password" or something like that.
10. now do this by both keyframes: select it, choose properties and past this:



stop();

now ur finished and ur timeline look like this:
http://members.lycos.nl/zandbergenb/tut/login/tl.JPG

for a working example:
http://members.lycos.nl/zandbergenb/tut/login/login.html

for the .fla:
http://members.lycos.nl/zandbergenb/tut/login/login.fla