|  | disable button |  | |
| | | Angel3m |  |
| Posted: Thu Jul 10, 2008 10:21 pm Post subject: disable button |  |
as my previous post LINK 8&threadid=1376794&enterthread=y i am facing a problem now that all the buttons are still working when the external movie loads on top. I want all the menu buttons to be disabled when the external movie loads and there is a CLOSE Button in the external movie. i tried to search for how to disable the buttons. i found some, but couldnt understand what to do.
So any help will be appreciated here plz.
Thnx in advance.
Regards |
| |
| | | kglad |  |
| Posted: Thu Jul 10, 2008 11:07 pm Post subject: Re: disable button |  |
| use use your buttons' _visible or enabled property. |
| |
| | | Angel3m |  |
| Posted: Thu Jul 10, 2008 11:26 pm Post subject: Re: disable button |  |
thnx for reply kGlad
may i know where to use these properties? sorry im not that familiar with terms that much...
Thnx again |
| |
| | | kglad |  |
| Posted: Fri Jul 11, 2008 1:50 am Post subject: Re: disable button |  |
you can use them just about anywhere that suits you. but it's best to attach code to a frame. in your case, you should attach it to a frame that contains your buttons and you should execute the code when you want to disable your buttons.
for example, when you execute your loadMovie() (or loadMovieNum() or loadClip() statement), you can execute:
btn1.enabled=false; btn2.enabled=false; // etc |
| |
| | | Angel3m |  |
| Posted: Fri Jul 11, 2008 9:42 pm Post subject: Re: disable button |  |
| |  | |
hi, i did tried to put in the button code of my previous issue
on (release) { // this.swapDepths(1); _root.createEmptyMovieClip("target_mc1",_root.getNextHighestDepth()); _root.target_mc1._x = -600; _root.target_mc1._y = -150; _root.target_mc1.loadMovie("1.swf"); security.enabled=false; }
i can't add any more buttons to disable them like after security btn if i add development btn only security btn will be disabled... all other btnz will be working. i want like, on click all the buttons gets disabled and in the external movie clip, when i click the CLOSE btn, all buttons gets enabled.
i found the following code.
for (var name in this) { if (typeof (this[name]) == "movieclip") { for (var name1 in this[name]) { if (typeof (this[name][name1]) == "object") { this[name][name1].enabled = false; } } } }
but i don't know the right place to add this code. though it works fine. disables all the btns with the name. again i wud like to put the structure of my file:
1. main container of left and rite menu, single layer
2. 2 layers. down layer -> right menu. up layer -> left.
Now if we enter in right menu mc....
3. animation of right menu
4. in animation mc there are 4 buttons animation tweening
5. button container with actionScript on button
6. Button
any ideas plz? |
| |
| | | kglad |  |
| Posted: Fri Jul 11, 2008 9:48 pm Post subject: Re: disable button |  |
| is your security button disabled when you execute that code? |
| |
| | | Angel3m |  |
| Posted: Fri Jul 11, 2008 9:52 pm Post subject: Re: disable button |  |
| yes, if the code is under On Release Action |
| |
| | | kglad |  |
| Posted: Fri Jul 11, 2008 9:57 pm Post subject: Re: disable button |  |
| and why can't you disable any more buttons? |
| |
| | | kglad |  |
| Posted: Fri Jul 11, 2008 9:57 pm Post subject: Re: disable button |  |
| and why can't you disable any more buttons? |
| |
| | | Angel3m |  |
| Posted: Fri Jul 11, 2008 10:02 pm Post subject: Re: disable button |  |
what can i say....  is there any other way?? |
| |
| Page 1 of 3 .:. Goto page 1, 2, 3 Next | |
|
|