# How do I condense this Moviclip button function?

**URL:** https://forum.kirupa.com/t/how-do-i-condense-this-moviclip-button-function/267374
**Category:** flash
**Created:** [July 31, 2008, 12:11pm UTC](https://forum.kirupa.com/t/how-do-i-condense-this-moviclip-button-function/267374 "2008-07-31T12:11:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flashfreelancer](https://avatars.discourse-cdn.com/v4/letter/f/22d042/32.png) [@flashfreelancer](https://forum.kirupa.com/u/flashfreelancer)
#### Post date: [July 31, 2008, 12:11pm UTC](https://forum.kirupa.com/t/how-do-i-condense-this-moviclip-button-function/267374/1 "2008-07-31T12:11:45Z")

</div>

I need some advice on how to condense this redundant Movie Clip script:

//ComboBox Scripts  
var myListener:Object = new Object();

section\_cb.addEventListener(“change”, myListener);

myListener.change = function () {  
seating\_mc.gotoAndStop(section\_cb.value);  
empty\_mc.loadMovie(“seating/” + section\_cb.value + “.jpg”);  
};

//movieClip Button Scripts Sections 100-110

seating\_mc.btn100\_mc.onRollOver = function() {  
myColor = new Color(this);  
myColor.setRGB(0xFFE400);  
}  
seating\_mc.btn100\_mc.onRollOut = function() {  
myColor = new Color(this);  
myColor.setRGB(0xD3D9FF);  
}  
seating\_mc.btn100\_mc.onRelease = function() {  
//this script tells movieclip to change comboBox  
section\_cb.selectedIndex = 0;  
empty\_mc.loadMovie(“seating/” + section\_cb.value + “.jpg”);  
seating\_mc.gotoAndStop(section\_cb.value);  
};
