Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

OR Operation ..!

Status
Not open for further replies.

triquad

Programmer
Feb 5, 2009
16
EG
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.

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 ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top