# If/else restore function

**URL:** <https://forum.kirupa.com/t/if-else-restore-function/254615>\
**Category:** Uncategorized\
**Created:** [March 13, 2008, 4:13pm UTC](https://forum.kirupa.com/t/if-else-restore-function/254615 "2008-03-13T16:13:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynobot](https://avatars.discourse-cdn.com/v4/letter/r/bbce88/32.png) [@rynobot](https://forum.kirupa.com/u/rynobot)\
**Post date:** [March 13, 2008, 4:13pm UTC](https://forum.kirupa.com/t/if-else-restore-function/254615/1 "2008-03-13T16:13:14Z")

</div>

hey - i’ve searched, but unable to find the answer to a what I believe is a pretty simple question.

I need to restore a function if a statement is untrue:

```auto
if (_root.main.set6 == 100) {
		this.onMouseMove = null();
	} else {
		_restore.onMouseMove();
	}

```

basically I need the onMouseMove to work again if the statement is untrue cancelling out the “null();”. apparently “\_restore” is not a flash command…

anyone know?  
thanks
