# Help with a simple mouse over and out

**URL:** <https://forum.kirupa.com/t/help-with-a-simple-mouse-over-and-out/281980>\
**Category:** flash\
**Created:** [February 16, 2009, 11:04am UTC](https://forum.kirupa.com/t/help-with-a-simple-mouse-over-and-out/281980 "2009-02-16T11:04:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![phurieda](https://avatars.discourse-cdn.com/v4/letter/p/ce7236/32.png) [@phurieda](https://forum.kirupa.com/u/phurieda)\
**Post date:** [February 16, 2009, 11:04am UTC](https://forum.kirupa.com/t/help-with-a-simple-mouse-over-and-out/281980/1 "2009-02-16T11:04:47Z")

</div>

I’ve got this Movie Clip and I wanted it so that when you click it, it moves out; when you click it again it moves back in.  
The effect I have on the movie clip is when you roll over it, it goes lighter and when you roll it out it goes back to dark.  
Problem:  
Because I have the above effect, the actual MC doesn’t follow the command I wanted to apply:  
I wanted it so that when I click the MC, it stays out - at the moment when I roll the mouse out it goes back in.

Code I have so far:

```auto

stop();

folioPressed1 = 1;

//ONE

oneMC.onPress = function() {
    if (folioPressed1 == 1) {
        folioPressed1 = 2;
        this.gotoAndPlay("press");
    } else if (folioPressed1 == 2) {
        folioPressed1 = 1;
        this.gotoAndPlay("pressAgain");
    }
};

oneMC.onRollOut = function() {
    this.gotoAndPlay("unhover");
};

oneMC.onRollOver = function() {
    this.gotoAndPlay("hover");
}

```

Anyone can help me with this?  
It’s a really simple code but for some reason I just couldn’t get it to work :sad:

Here’s the swf file\>  
[www.phurieda.com/folioPhurieda.swf](http://www.phurieda.com/folioPhurieda.swf)

thanks guys!
