kredd
10-24-2006, 11:57 PM
hello all,
i've got a campus map with buttons over the campus buildings. on rollover/rollout a "info balloon" appears/disappears. on click the balloon stays visible and the button is disabled so the rollover/rollout quit working.
i have 40-50 buildings with buttons(map MC). i have one info balloon(a MC nested in the map MC) . when each building button is clicked i need to send the name of that button to the 'close' button, in the info balloon MC, so that on release the 'close' button can re-enable the button.
the code for the first button would be:
btn1.enabled = false;
_global.actv_btn = "btn1"
the code in the "close" btn in the balloon MC that should re-enable the buttons:
_root.main_scroller.spContentHolder.*_global.actv_btn*.enabled = true;
the *variable* is what needs to change dynamically. don't really know if i need to use a _global variable or not. if i hard code the button name into the re-enable code it works fine. also trace(_global.actv_btn) shows the correct value is being passed, but still nothing happens.
i tried this 'close' button code as well...
sp = _global.actv_btn
_root.main_scroller.spContentHoldersp.sp.enabled = true;
trace(_global.actv_btn)
the trace shows its building the code with the *btn1* name but the code doesn't work. i hope i've made sense.
any ideas?? thanks!
i've got a campus map with buttons over the campus buildings. on rollover/rollout a "info balloon" appears/disappears. on click the balloon stays visible and the button is disabled so the rollover/rollout quit working.
i have 40-50 buildings with buttons(map MC). i have one info balloon(a MC nested in the map MC) . when each building button is clicked i need to send the name of that button to the 'close' button, in the info balloon MC, so that on release the 'close' button can re-enable the button.
the code for the first button would be:
btn1.enabled = false;
_global.actv_btn = "btn1"
the code in the "close" btn in the balloon MC that should re-enable the buttons:
_root.main_scroller.spContentHolder.*_global.actv_btn*.enabled = true;
the *variable* is what needs to change dynamically. don't really know if i need to use a _global variable or not. if i hard code the button name into the re-enable code it works fine. also trace(_global.actv_btn) shows the correct value is being passed, but still nothing happens.
i tried this 'close' button code as well...
sp = _global.actv_btn
_root.main_scroller.spContentHoldersp.sp.enabled = true;
trace(_global.actv_btn)
the trace shows its building the code with the *btn1* name but the code doesn't work. i hope i've made sense.
any ideas?? thanks!