# Problem with Event Handler

**URL:** <https://forum.kirupa.com/t/problem-with-event-handler/253924>\
**Category:** flash\
**Created:** [March 6, 2008, 3:03pm UTC](https://forum.kirupa.com/t/problem-with-event-handler/253924 "2008-03-06T15:03:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kaysingh](https://avatars.discourse-cdn.com/v4/letter/k/d07c76/32.png) [@kaysingh](https://forum.kirupa.com/u/kaysingh)\
**Post date:** [March 6, 2008, 3:03pm UTC](https://forum.kirupa.com/t/problem-with-event-handler/253924/1 "2008-03-06T15:03:49Z")

</div>

I’ve used Kirupa’s code for making a movie clip behave like a button:

[SIZE=1][COLOR=darkred]stop();

this.onEnterFrame = function(){  
if(rewind == true){  
prevFrame();  
}  
}[/COLOR][/SIZE]  
[SIZE=1][COLOR=darkred]this.onRollOver = function(){  
rewind = false;  
play();  
}[/COLOR][/SIZE]  
[SIZE=1][COLOR=darkred]this.onRollOut = function(){  
rewind = true;  
}[/COLOR][/SIZE]  
[SIZE=1][COLOR=darkred]this.onRelease = function(){  
gotoAndPlay(“Scene 1”,“start”);  
}[/COLOR][/SIZE]  
[SIZE=1][COLOR=#8b0000][/COLOR][/SIZE]  
The code allows a tweened animation to play backwards as well as forwards. In my case when you rollover a movie clip it starts off with a dark tint and then becomes brighter. Once you roll out of the movie clip it goes back to a dark tint. This is all good…

but…

The problem I am having is that the last line of code does not actually work. I cannot get the movie clip to take me to a new scene, but it will divert me to a URL if I want it to.

Any ideas anyone?
