# Proper way to phrase an unload function -

**URL:** <https://forum.kirupa.com/t/proper-way-to-phrase-an-unload-function/221612>\
**Category:** Uncategorized\
**Created:** [April 5, 2007, 5:05pm UTC](https://forum.kirupa.com/t/proper-way-to-phrase-an-unload-function/221612 "2007-04-05T17:05:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![justinhale](https://avatars.discourse-cdn.com/v4/letter/j/3bc359/32.png) [@justinhale](https://forum.kirupa.com/u/justinhale)\
**Post date:** [April 5, 2007, 5:05pm UTC](https://forum.kirupa.com/t/proper-way-to-phrase-an-unload-function/221612/1 "2007-04-05T17:05:53Z")

</div>

below is my actionscript:

i’m having issues with my creative working differently in two different places. i think it has to do with the onrollout i have below:

function loadPix(pix){  
pixHolder.loadMovie(pix);  
}  
button\_1.onRollOver=function(){  
//call the function, pass the specific picture name  
loadPix(“[http://www.whatever.com/test.jpg](http://www.whatever.com/test.jpg)”);  
}  
button\_1.onRollOut=function(){  
loadPix("");  
}

on roll over i want the image to load on the stage,  
on roll out i want the pixholder to be empty.

is this the proper way to phrase the roll out?

}  
button\_1.onRollOut=function(){  
loadPix("");  
}

please help! it’s pretty urgent.

thank you!

jh.
