# Multiple Rollovers using Dynamic Images

**URL:** <https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835>\
**Category:** flash\
**Created:** [August 22, 2002, 2:17am UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835 "2002-08-22T02:17:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![HipSoul](https://avatars.discourse-cdn.com/v4/letter/h/ac91a4/32.png) [@HipSoul](https://forum.kirupa.com/u/HipSoul)\
**Post date:** [August 22, 2002, 2:17am UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835/1 "2002-08-22T02:17:58Z")

</div>

Hello anyone, everyone, someone…

I’ve got 12 buttons in my portfolio that are multiple rollovers…when you hover over a button it changes color and a dynamic image pops up on the page next to it.

I used the Kirupa tutorial on loading dynamic images and it worked great in loading the image, the problem is when I hover OFF the button, the image stays put and won’t unload…leaving me with an overlapping mess of images by the time all 12 buttons have been pressed/viewed.

I’m sure it’s as simple as “unloadMovie” or something, but me being novice to Actionscript I can’t make it work properly.

Here’s the original code that works properly:

on (rollOver) {  
loadMovie(“portfolio1.jpg”, “Web1”);  
}

Now what would the next statement be that would unload(?) the image from the page when I hover OFF the button?

Jay

---

<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:** [August 22, 2002, 2:30am UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835/2 "2002-08-22T02:30:49Z")

</div>

Me again,

jsut to clarify what I have so that I don’t waste time on the obvious, here’s exactly what’s in my first button action:

on (rollOver) {  
loadMovie(“portfolio1.jpg”, “Web1”);  
}  
on (rollOut) {  
unloadMovie(“portfolio1.jpg”, “Web1”);

}

And exactly what error shows up when I test the scene:

Scene=PORTFOLIO, Layer=WEB Menu, Frame=1: Line 5: Wrong number of parameters; unloadMovie requires exactly 1.  
unloadMovie(“portfolio1.jpg”, “Web1”);

I have NO IDEA what “exactly 1” means in the error!!!  
So I can’t figure it out for myself any further…

Any suggestions? Am I doing this all wrong?

Thanks

Jay

---

<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:** [August 22, 2002, 8:03am UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835/3 "2002-08-22T08:03:16Z")

</div>

Try

on (rollOut) {  
unloadMovie(“Web1”);

}

or

on (rollOut) {  
Web1.unloadMovie();

}

---

<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:** [August 22, 2002, 8:06am UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835/4 "2002-08-22T08:06:20Z")

</div>

unload movie doesn’t care what’s in the movie, it only needs the movie name.

get rid of the jpg argument.

---

<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:** [August 22, 2002, 5:25pm UTC](https://forum.kirupa.com/t/multiple-rollovers-using-dynamic-images/4835/5 "2002-08-22T17:25:22Z")

</div>

That’s the ticket!!!

Thank you very much gentleman, I’m on my way to buy some “friends of ED” stuff right now so I don’t have to ask uneducated questions anymore!!

btw, sbeener…you work at Blast Radius by any chance?

I used to live in Vancouver about a year ago, I was the lead client designer at the now bought-out [Stockhouse.com](http://Stockhouse.com).

Say Hi to Cory Christians and Arch for me if you do…

Peace and thanks again!!!

Jay
