# Login and passoword limit attempts

**URL:** <https://forum.kirupa.com/t/login-and-passoword-limit-attempts/18993>\
**Category:** Uncategorized\
**Created:** [April 23, 2003, 9:17am UTC](https://forum.kirupa.com/t/login-and-passoword-limit-attempts/18993 "2003-04-23T09:17:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vdesigns](https://avatars.discourse-cdn.com/v4/letter/v/ba9def/32.png) [@vdesigns](https://forum.kirupa.com/u/vdesigns)\
**Post date:** [April 23, 2003, 9:17am UTC](https://forum.kirupa.com/t/login-and-passoword-limit-attempts/18993/1 "2003-04-23T09:17:40Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 23, 2003, 2:00pm UTC](https://forum.kirupa.com/t/login-and-passoword-limit-attempts/18993/2 "2003-04-23T14:00:36Z")

</div>

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:

```auto

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

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 24, 2003, 10:39am UTC](https://forum.kirupa.com/t/login-and-passoword-limit-attempts/18993/3 "2003-04-24T10:39:39Z")

</div>

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);

```

}
