Login and passoword limit attempts

well i posted a question before …I guess it was misworded well here is what i want to do

1> there are to input boxes for login name and the password
and a login button.

    login : |________|

password : |________|

                  [login] 

2> Then there are 3 graphics or movie clips
1-- which says successful
2-- which says failure
3-- which says number of attempts up please leve this site
da-haaaaa. or giives a link to register.

         note --- the link is also avilable on every page to register

3> if login/password is right move to successful.

4> if login/passsword is wrong — this shows failure animation
and if the user makes three attempts then
5> after 3 attempts are up on the 4th — he is asked to leave
the site.

note : I defined a variable counter and sarted it from 0 and which increments i.e. counter++

I need help with the code and how to count the increments cause
my code either gets stuck at 2 or when i used the for loop it keeps reapting 1 and then fianlly hangs.

i need one of you gurus to help me with the counter and how i keep count

if anyone give me the code with all loops if that is possible …

I know it a lot to ask but need help man

:-\ i still am confused

show us your code. Usually you would just toss and if statement in there and be like

say you wanted to limit it to 3 tries…

around the entire code you would put:


if(counter <= 3){
    // put rest of code in this spot
    // -.-.-.-.-.-.-.--.-.-.-.-.-.-.-.-.-.-.-.-
}else{
    // You tried too many times 
}

this is what i tried

on (release) {

if(count != 4){

if (logintext == "winnner" && passtxt == "thriller") {
 
gotoAndStop ("success");// diaplays "you are in"

} else{

_root.errormessage.gotoAndplay("start");//here ia movie clip with a blinkig error

}
count++;
}

else{

gotoAndstop (“out”);//the place where the no authority message is diaplayed

}

trace (count);

}