# Alternative code

**URL:** <https://forum.kirupa.com/t/alternative-code/316581>\
**Category:** flash\
**Created:** [November 26, 2010, 7:56pm UTC](https://forum.kirupa.com/t/alternative-code/316581 "2010-11-26T19:56:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben1996123](https://avatars.discourse-cdn.com/v4/letter/b/a87d85/32.png) [@ben1996123](https://forum.kirupa.com/u/ben1996123)\
**Post date:** [November 26, 2010, 7:56pm UTC](https://forum.kirupa.com/t/alternative-code/316581/1 "2010-11-26T19:56:32Z")

</div>

Well what I want to happen, is when the alpha of an object hits 0, to gotoAndStop on a different frame. This is the code I have that isn’t working.

```auto
onClipEvent(enterFrame){
	if(this._alpha<=0){
		gotoAndStop(5)
	}
}

```

What do I need to change this to?
