greetings all
hopefully a short question
i have a batch of buttons.
now in the past (as 2) i had this very simple check to see if the button was clicked, meanwhile the other buttons got back to its original state, via this simple code
var selectedM:MovieClip;
BUTTON.onRelease = function() {
if (selectedM != this) {
selectedM.enabled = true;
}
//if an item is selected we make sure the item can't be triggered again.
selectedM = this;
selectedM.enabled = false;
now in AS 3. it seems to be a different story
i tried:
var selectedM:MovieClip;
function clicker(e:Event){
if (selectedM != e.target)
{
selectedM.enabled = true;
}
selectedM = e.target;
e.target.enabled = false;
}
//for loop has BUTTON.addEventListener(MouseEvent.CLICK,clicker)
or where e.target is i tried to replace it with “this” but all to no avail
i am probally looking over something but if anyone could give me a go, i’d be very thankfull
cheers