# onEnterFrame and onRollOver Problem

**URL:** https://forum.kirupa.com/t/onenterframe-and-onrollover-problem/210838
**Category:** flash
**Created:** [December 22, 2006, 6:07pm UTC](https://forum.kirupa.com/t/onenterframe-and-onrollover-problem/210838 "2006-12-22T18:07:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mediumman](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/mediumman/32/551_2.png) [@mediumman](https://forum.kirupa.com/u/mediumman)
#### Post date: [December 22, 2006, 6:07pm UTC](https://forum.kirupa.com/t/onenterframe-and-onrollover-problem/210838/1 "2006-12-22T18:07:40Z")

</div>

I am using two commands to run a function in the first frame of my movie…code below…however, the Rollover and RollOut are not working, just the onEnterFrame…if i take out the onEnterFrame they work fine and If i change the onEnterFrame to onLoad they both work fine, but i need to use the onEnterFrame …is there a way around this? Can i just set a on(rollover) in my button? if so, how do i setup that code?

tbutton.onEnterFrame = function() {  
snder(“snd”, true);  
}  
\_root.tvb.onRollOver = function() {  
snder(“tradi”, true);  
}  
\_root.tvb.onRollOut = function() {  
snder(“snd”, true);  
}
