hello all, i have a “campus map MC” that is an attachedmovie clip linked from the library to a scrollpane on the main timeline. there is a “info balloon MC” in the “campus map” with a “close” button on the info balloon that hides the balloon.
the campus map has buttons over each bldg. on rollover/rollout the “info balloon MC” appears and disappears. if you click the button it ‘stays’ and the button is disabled so that the rollover/out stop.
button code:
on (rollOver) {
setProperty(this.bubble,_visible, 100); // info balloon MC nested in the campus map MC
setProperty(this.bubble,_x, 200);
setProperty(this.bubble,_y, 50);
}
on (rollOut) {
setProperty(this.bubble,_visible, 0);
}
on (release){
setProperty(this.bubble,_visible, 100);
btn1.enabled = false; // btn1 is name of button
_global._global.actv_btn = "btn1" // var sent to the close button
}
what should happen:
click a building button…info balloon pops up and button is disabled. ‘close’ button is clicked on the info balloon. info balloon disappears. button is re-enabled.
everything works except the last step of re-enabling.
i know the code works cause if i hard code the button name the re-enabling works.
i know the var with the button name is successfully passed using trace()
but replace the hard coded button name with the variable and nothing happens.
my ‘close’ button code(frame scipt):
close_btn.onRelease = function() {
sp = _global.actv_btn;
this._parent[actv_btn].enabled = true; // one method i tried
//_root.main_scroller.spContentHolder.sp.enabled = true; // another method
setProperty(_root.main_scroller.spContentHolder.bubble,_visible, 0);
//trace(sp) // actually equals "btn1" but the code still won't work!
}
any ideas?? thanks!