# Movie clip buttton

**URL:** <https://forum.kirupa.com/t/movie-clip-buttton/173214>\
**Category:** Uncategorized\
**Created:** [December 22, 2005, 12:53pm UTC](https://forum.kirupa.com/t/movie-clip-buttton/173214 "2005-12-22T12:53:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirksmith](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dirksmith](https://forum.kirupa.com/u/dirksmith)\
**Post date:** [December 22, 2005, 12:53pm UTC](https://forum.kirupa.com/t/movie-clip-buttton/173214/1 "2005-12-22T12:53:41Z")

</div>

Hi

Grateful for some help with a movie clip button I’m trying to perfect.

The idea is to have a button stay on the down state only when clicked (on Release) - rather than on both onRollout and OnRelease, as is the case at the moment.

onRelease I’m sending the timeline to frame 20 - the down state. OnRollout the timeline is going to frame 1 - the initial ‘state’ - unless the frame is already on frame 20 (a conditional).

The problem is that on RollOut, the conditional isn’t working - the button appears clicked (i.e. the timeline is going to frame 20).

Is this an issue with the conditional ? The AS and the code logic appears to be sound.

You can see the buttons here: [http://www.detkendesign.com/detken2/portfolio.htm](http://www.detkendesign.com/detken2/portfolio.htm)

Any ideas on fixing this?

Thanx!

Dirk

onRollOver = function()  
{  
this.gotoAndPlay(2);  
}

onRollOut = function() {  
{  
this.gotoAndStop(1);  
if (this.\_currentframe != 20)  
gotoAndStop(20);  
}}

onRelease = function()  
{  
this.gotoAndStop(20);  
}  
stop();
