flash nested button, not responding
- Started
- Last post
- 8 Responses
- vaporstouch
i have a MC with onRollOver/onRollOut code directed at it, opening/closing a menu of navigation. the nav buttons are MCs, which have the _up/_over/_down frames. but nested inside the main MC, they no longer work, and neither does the onPress code associated with them. is there a workaround?
thanks
- System-Idle0
name the main MC and add the name to the begining of the btn taget path.
mainMC.myBtnMc.onPress
etc
- vaporstouch0
this container MC is named. there is onRollOver/Out code in the main timeline which tells that to open a menu of nav buttons (MCs) .those buttons dont work when nested in that container MC, the rollovers states dont work/etc. seems like the container button is overridding things.
- fadeproof0
hey vapor -
I had posted the EXACT same problem a few weeks back - nothing seems to work, as it really is bullshit because you would think that this is one of the most basic functions that people would try to pull off.
- vaporstouch0
thanks man, that is unbelievably stupid. in that case my flash drop-down menus need to be redone. anybody got a good tutorial?
- unfittoprint0
I think you want your parentMC to trigger the dropdown to appear/dissapear.
The usual way is the following.
make 3 MCs: the menuMC, the subMenuMC[with all the nested buttons] and the triggerMC [with its alpha set to 0] behind the subMenuMC.initial parameters:
subMenu._visible=false;
triggerMC._visible=false;menuMc.onRollOver=function(){
subMenu._visible=true;
}trigger.onRollOver=function(){
this._visible=false;
subMenu._visible=false;
}
- vaporstouch0
thanks unfit. but i think
trigger.onRollOver=f unction(){
this._visible=false;
subMenu._visible=fal se;
}should be on rollOut right?.
- unfittoprint0
no, because your triggerMC [wich is, for example, a slightly bigger rectangle than submenuMC._height*submenuMC._wid... is triggered the first time the user leaves submenuMC.
menuMC -> opens subMenu/ enables trigger
triggerMc -> closes subMenu/ disables triggerMc
- vaporstouch0
ok i get it, thank you unfit!