I have a function written in AS2 which I want it to display two of 6 possible images if the condition is true. The problem is that I can't figure out how to make the function choose & display the images RANDOMLY.
The codes above do not work & all the images get displayed. What do you think ?
Code:
button1.onRelease = function():Void {
//See if answer is correct
if(CorrectCondition == 1){
//display
(button2._visible = true) && (button3._visible = true) || (button4._visible = true) && (button5._visible = true) || (button6._visible = true) && (button7._visible = true);
}}
The codes above do not work & all the images get displayed. What do you think ?