# OnPress -- only occur once

**URL:** <https://forum.kirupa.com/t/onpress-only-occur-once/174261>\
**Category:** Uncategorized\
**Created:** [January 4, 2006, 7:58am UTC](https://forum.kirupa.com/t/onpress-only-occur-once/174261 "2006-01-04T07:58:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![niqhty](https://avatars.discourse-cdn.com/v4/letter/n/e47774/32.png) [@niqhty](https://forum.kirupa.com/u/niqhty)\
**Post date:** [January 4, 2006, 7:58am UTC](https://forum.kirupa.com/t/onpress-only-occur-once/174261/1 "2006-01-04T07:58:06Z")

</div>

I have an onPress event:

```auto
mRectangle.onPress = function():Void { 
twTween = new Tween(this, "_width",
  mx.transitions.easing.Regular.easeOut, 1220, 185, 25);    
}

```

I only want this event to happen once. I’m new to actionscript, but I imagine that there’s a quick and easy way to do that.

Can someone help me? I’m using AS 2.0.

Thanks.
