# Function Help

**URL:** <https://forum.kirupa.com/t/function-help/242199>\
**Category:** flash\
**Created:** [October 23, 2007, 3:43pm UTC](https://forum.kirupa.com/t/function-help/242199 "2007-10-23T15:43:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![briand5](https://avatars.discourse-cdn.com/v4/letter/b/c0e974/32.png) [@briand5](https://forum.kirupa.com/u/briand5)\
**Post date:** [October 23, 2007, 3:43pm UTC](https://forum.kirupa.com/t/function-help/242199/1 "2007-10-23T15:43:50Z")

</div>

Hi, I need a little help writing a function inside of a button. Here is my current code:

on (rollOver) {  
box\_1.loadMovie(“over.swf”);  
}  
on (rollOut) {  
box\_1.loadMovie(“blank.swf”);  
}  
on (release) {  
box\_2.loadMovie(“blank.swf”);  
}  
on (release) {  
box\_1.loadMovie(“expanded.swf”);  
}

Somebody awhile told me that I should not have two (2) “on (release)” calls within one button but I cant seem to find a way to write a function for both of these. If anyone could help me I would really appreciate it.

Thanks,  
Brian
