Hi chaps, I have serveral buttons on the main movie. When I click one, and new movie pops up and takes up about 50% of the main movie clip. I want to disable access to the buttons on the main movie clip while this new clip is running. I was looking at the setFocus statement but couldt figure out if this was the right direction to take.. Cheers Mike
say you have five buttons with instance names button1, button2, etc. and one of these buttons (first one for example), loads the clip. For this button you could use: on(release) { //load your clip here for(i=1;i<=5;i++) { eval("button" + i).enabled = false;//disable all the buttons } then when the clip finishes, reenable the buttons. }
Thanks alot for your reply. I have inserted the code you wrote and it does the job in disabling the buttons. I?m just have trouble getting them re enabled now. I put the enabled = true where you suggested, but becuase of what is already going on in the code it doesn?t work (they stay disabled after the movie finished). I?m not sure where I can put the enabled line to get it re enabled again? heres the code I am using. for(var n=0; n < MyBtns.length; n++){ this[MyBtns[ n ]].onRelease=function(){ aTemp = this._name.split("But"); num = aTemp[ 1 ]; for(i=1;i<=5;i++) { eval("but" + i).enabled = false;//disable all the buttons } CallAlpaMov (MyClips[ num ],MyClips[ num ], 1, 400, 300); }; } thanks, Mike
If you want it reenabled only after the movie clip finishes then in the last frame of the movie clip you could put: for(i=1;i<=5;i++) { eval("_parent.but" + i).enabled = true;//need correct path back to buttons here } this assumes the buttons are in the parent of the movie clip or, if they are in their own clip you could use "_root.mclip.but" ("mclip" being the name of their clip). You can definitely reenable the buttons but the path will have to be correct.
spot on, thanks alot. I did that before but wasnt specifying the correct path. cheers
Don't see what you're looking for? Try a search.
|