# Dynamic button rollover

**URL:** https://forum.kirupa.com/t/dynamic-button-rollover/251875
**Category:** Uncategorized
**Created:** [February 13, 2008, 1:39pm UTC](https://forum.kirupa.com/t/dynamic-button-rollover/251875 "2008-02-13T13:39:29Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![randomagain](https://avatars.discourse-cdn.com/v4/letter/r/35a633/32.png) [@randomagain](https://forum.kirupa.com/u/randomagain)
#### Post date: [February 13, 2008, 1:39pm UTC](https://forum.kirupa.com/t/dynamic-button-rollover/251875/1 "2008-02-13T13:39:29Z")

</div>

I’ve got dynamic buttons, but obviously the rollover and rollout will be the same, but when I have a stab at enabling rollover functions, the buttonactions die

please help:stare:

```auto
 
 
for (i=0; i<5; i++) {
 b = _root.attachMovie("stagebut", "button"+i, _root.getNextHighestDepth());
 b._x = 50*i+465;
 b._y = 278;
 b.id = i;
 b.dynT.text = b.id+1;
 //b = tVar
 /*
 b.onRollOver = function() {
  this.gotoAndStop(2);
 };
 b.onRollOut = function() {
  this.gotoAndStop(1);
 };*/
 
}
 
button0.onRelease = function() {
 trace("button"+this.id+"pressed");
 this._parent.gotoAndStop(3);
 this._parent.mainfoot.gotoAndPlay("slicetop");
 this._parent.origin1._visible = false;
 this._parent.origin2._visible = false;
 this._parent.finish._visible = false;
 this._parent.mainfoot._visible = true;
 //this.sidefoot.gotoAndPlay("sideslice");
 desc_txt.text = "Remove base wedge, medial cortex of the metatarsal remains to act as a hinge.";
};
 

```
