# Dynamic menu

**URL:** <https://forum.kirupa.com/t/dynamic-menu/177041>\
**Category:** Uncategorized\
**Created:** [January 29, 2006, 7:18pm UTC](https://forum.kirupa.com/t/dynamic-menu/177041 "2006-01-29T19:18:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirksmith](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dirksmith](https://forum.kirupa.com/u/dirksmith)\
**Post date:** [January 29, 2006, 7:18pm UTC](https://forum.kirupa.com/t/dynamic-menu/177041/1 "2006-01-29T19:18:09Z")

</div>

hi

I have a dynamic menu using the script below - but I’m having problems extending it so additional mc buttons effect a change on 1 of the buttons states when released.

Basically, I’d like 9 other mc buttons to turn the mvcBt1 mc buttton instance to the off state when clicked.

I’ve tried targeting the mvcBt1 mc buttton instance with a gotoAndStop when a target movie is loaded but this isn’t working.

You can see the problem here: [http://www.dirksmith.com/index\_vtest.php](http://www.dirksmith.com/index_vtest.php)

The issue is turning the ‘work’ bt to the off state if the portfolio examples are accessed from double clicking the ‘polaroids’.

Any ideas / input on fixing this appreciated

Thanx

Dirk

The dynamic button script:

* * *

fncBtnBuild = function () {  
for (var icrBtn = 0; icrBtn\<7; icrBtn++) {  
var rfcClip = this[“mvcBtn”+icrBtn];  
rfcClip.nbrID = rfcClip.stgBtnID=icrBtn;  
rfcClip.onRelease = function() {  
this.enabled = false;  
this.gotoAndStop("\_off");  
var rfcLast = this.\_parent[“mvcBtn”+this.\_parent.nbrBtnLast];  
rfcLast.enabled = true;  
rfcLast.gotoAndStop("\_up");  
this.\_parent.nbrBtnLast = this.nbrID;  
};  
}  
mvcBtn0.enabled = false;  
mvcBtn0.gotoAndStop("\_off");  
nbrBtnLast = 0;  
};  
fncBtnBuild();

The addional (polaroid) mc buttons script:

* * *

on (press) {  
//Start Dragging Movieclip Behavior  
startDrag(this, false, 168, 224, 564, 476);  
this.swapDepths(this.\_parent.getNextHighestDepth());  
n=this.getDepth();  
\_root.introBox.swapDepths(n+1);  
//End Behavior

}  
on (release) {  
if(getTimer()-lastClick \< 500){  
loadMovieNum(“[http://www.dirksmith.com/flash\_2/port\_conrad.swf](http://www.dirksmith.com/flash_2/port_conrad.swf)”,50);  
}  
lastClick=getTimer();  
stopDrag();

```
}

```

on (rollOut) {  
stopDrag();

}
