# Login

**URL:** <https://forum.kirupa.com/t/login/285481>\
**Category:** Uncategorized\
**Created:** [April 1, 2009, 12:37pm UTC](https://forum.kirupa.com/t/login/285481 "2009-04-01T12:37:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dilpreet](https://avatars.discourse-cdn.com/v4/letter/d/51bf81/32.png) [@dilpreet](https://forum.kirupa.com/u/dilpreet)\
**Post date:** [April 1, 2009, 12:37pm UTC](https://forum.kirupa.com/t/login/285481/1 "2009-04-01T12:37:56Z")

</div>

can anyone help me with my code  
flash gives me an error saying -  
The private attribute may be used only on class property definitions.

here is my code

```auto
myButton.addEventListener(MouseEvent.CLICK, "onMyButtonRelease");

private function onMyButtonRelease(event:Event):void{
//Run logic code here
if((userid == "me" && password == "mine") || (userid == "guest" && password == "guest") )
{
  mess = "Welcome "+username;
  gotoAndPlay("mainYard")();
}else{
  mess = "Invalid username and password!";
}
}

```
