# Playing frames as mouse rolls out

**URL:** <https://forum.kirupa.com/t/playing-frames-as-mouse-rolls-out/331224>\
**Category:** flash\
**Created:** [June 17, 2013, 12:59pm UTC](https://forum.kirupa.com/t/playing-frames-as-mouse-rolls-out/331224 "2013-06-17T12:59:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![satrebor](https://avatars.discourse-cdn.com/v4/letter/s/e68b1a/32.png) [@satrebor](https://forum.kirupa.com/u/satrebor)\
**Post date:** [June 17, 2013, 12:59pm UTC](https://forum.kirupa.com/t/playing-frames-as-mouse-rolls-out/331224/1 "2013-06-17T12:59:28Z")

</div>

I have a code attatched to button  
on(rollOver){gotoAndPlay(2);}

I have Other animation on frame 42.

How to do that, once I mouseOver flash plays frame 2.  
Once mouseOut flash plays 42 frame. The code like:

```auto
on(rollOver){gotoAndPlay(2);}
on(rollOut){gotoAndPlay(42);}

```

is wrong I know. How to do that please help. Thank you.
