# Stopping an animation with a mouse over

**URL:** https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101
**Category:** Uncategorized
**Created:** [July 19, 2004, 8:11pm UTC](https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101 "2004-07-19T20:11:03Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![sci](https://avatars.discourse-cdn.com/v4/letter/s/ce7236/32.png) [@sci](https://forum.kirupa.com/u/sci)
#### Post date: [July 19, 2004, 8:11pm UTC](https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101/1 "2004-07-19T20:11:03Z")

</div>

good evening,

absolutely moronic question I’m afraid. (I’m a complete amateur at flash but am enjoying learning it).

I’m trying to create a random picture gallery that displays a selection of pictures, in quick succession. Only one picture appears at a time. I’ve placed 5 small pics in the same place, each in a different frame on the time line and placed a gotoAndPlay(1) on the final frame so it continually cycles through the pics.

I just want the pictures to stop cycling through when the mouse is placed over the top of the pic and to carry on when the mouse is taken off.

I tried making them buttons etc but I’m getting in a bit of a muddle.

thanks for any help.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 19, 2004, 8:14pm UTC](https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101/2 "2004-07-19T20:14:01Z")

</div>

Yes, make them buttons. Then, use this:[AS]on (rollOver){  
stop();  
}  
on (rollOut){  
play();  
}[/AS]This should work.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 19, 2004, 8:20pm UTC](https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101/3 "2004-07-19T20:20:00Z")

</div>

ahhhhh… so simple. Thanks alot for your help wizard.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [July 19, 2004, 8:20pm UTC](https://forum.kirupa.com/t/stopping-an-animation-with-a-mouse-over/58101/4 "2004-07-19T20:20:42Z")

</div>

You’re welcome. :beam:
