# What am I doing wrong with this function?

**URL:** <https://forum.kirupa.com/t/what-am-i-doing-wrong-with-this-function/117738>\
**Category:** Uncategorized\
**Created:** [July 29, 2004, 9:10pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong-with-this-function/117738 "2004-07-29T21:10:47Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![stringy](https://avatars.discourse-cdn.com/v4/letter/s/919ad9/32.png) [@stringy](https://forum.kirupa.com/u/stringy)\
**Post date:** [July 30, 2004, 8:52pm UTC](https://forum.kirupa.com/t/what-am-i-doing-wrong-with-this-function/117738/10 "2004-07-30T20:52:00Z")

</div>

try  
\_global.subControl = function(mc, mc2) {

```
mc.onRollOver = function() {
	mc.colorTo("0x00CC00", 0.5, "easeOutExpo");
	_level0.all.pulseMC[mc2].gotoAndPlay("play");
};
mc.onRollOut = function() {
	mc.colorTo("0xCCCCCC", 0.5, "easeOutExpo");
};

```

};  
\_level0.all.content.subMenu.btn2.onEnterframe =  
function() {  
subControl(this,“pulseMC1”)  
};

---

_[View the full topic](https://forum.kirupa.com/t/what-am-i-doing-wrong-with-this-function/117738)._
