I’ve done a search for ‘disable buttons’ and found lots, but am not sure how to go about the situation with my code! Below is my code on 1 of 9 buttons. Once the button is clicked, indeed it is disabled but as with most people I want that button to become active again once the next button is clicked. Other than me writing: [COLOR=blue]_root.btns_cntr.profile_btn.enabled = true;[/COLOR] for each button and placing in every buttons code…is there something else I can do?
store the buttons in an array. Intially all the buttons enabled and passingvalues status turned to false. YOu can set more arguments for loading external movie, alpha and so on.
This sounds great, and i’ve set it up in my AS but i’m not entirely sure whats what. is it possible to explain the code. I’m still a newbie you see! :ponder:
e.g. where do i reference which button i want disabled?
Not so sure that answered my last query. :m2:
I find I get on better if I can understand what each bit of the code does so I dont have to post on here for every little thing. I’ve used arrays before but this:
for (var i = 0; i<bArray.length; i++) {
var btn = this[“b”+i];
for (var i = 0; i<bArray.length; i++){ This means:
Make a new variable named “i”(var i = 0), while “i” is less than the length of the array(i<bArray.length), Incriment “i” every time you run the code(i++).
It will loop through the code below until “i” equals the length of the array. Then it will stop.
var btn = this[“b”+i]
that is to make a variable out of the given button in the array, so that during the loop you can refer to “btn” instead of “[“b”+i]”.
Ok so the code is explained…give me time, it’ll sink in:puzzled: hehe
This is what I have: / /…but where does each bit of code go in conjunction with my button code! sorry for being a dumb-***!