Question
Javascript change color button after press it
Hi.
Is it possible to use Javascript code to change the color of the button (button not movie clip object) after pressing it?
this is my code:
const goodElements = [this.mc1_1, this.mc2_1] //buttons good
const wrongElements = [this.mc1_2, this.mc2_2] //buttons wrong
const Comparison = [...goodElements, ...wrongElements]
goodElements.forEach((element, index) => {
element.addEventListener('click', () =>{
points++
//element.gotoAndStop(1);
element.mouseEnabled=false;
exportRoot.stworek.gotoAndPlay("good1");
exportRoot.goodAnswer.play();
nextFrame();
});
})
Thank you!
