# Age verification problem

**URL:** <https://forum.kirupa.com/t/age-verification-problem/222296>\
**Category:** flash\
**Created:** [April 12, 2007, 10:28am UTC](https://forum.kirupa.com/t/age-verification-problem/222296 "2007-04-12T10:28:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Primsi](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/primsi/32/3508_2.png) [@Primsi](https://forum.kirupa.com/u/Primsi)\
**Post date:** [April 12, 2007, 10:28am UTC](https://forum.kirupa.com/t/age-verification-problem/222296/1 "2007-04-12T10:28:51Z")

</div>

I am not very skillful with ActionScript, … although I managed to write a small script for age verification, for a alcoholic beverages site. The script gets two variables from two input text fields (19AB).

There are four frames[LIST=1]  
[_]input fields and continue button  
[_]the verification script, that goes:

```auto
age = 0;
year = new Date();
yearBirth = 19+A+B;
yearCurrent = year.getFullYear();
age = yearCurrent-yearBirth ;

if (age >= 18) {
    gotoAndPlay(3);
}
else {
    gotoAndPlay(4);
}

```

[_]video and continuation to the site  
[_]“You can’t enter” message[/LIST]The problem is that it lets me through even if i don’t write anything in the input text fields :wasted:.

Any suggestions?
