Groups | Blog | Home
all groups > flash exchange extensions > october 2005 >

flash exchange extensions : If...then base on random number


Mintyman
10/26/2005 12:00:00 AM
Hi,

I have a 1 frame movie containing 2 graphics symbols and some sub movie
clips. I would like to be able to display one graphic randomly and hide the
other. In English I think the code would look like:

Generate random number
If Random Number >50 or < 100 then
background1.visible = true
background2.visible = false

If Random Number < 50 then
background1.visible = false
background2.visible = true

End

Can anyone help me code this actionscript please?


Mintyman
10/26/2005 12:00:00 AM
sorry.....wrong forum

[quoted text, click to view]

taraschuk
10/27/2005 12:00:00 AM
if(random_num > 50 || random_num < 100){
background1.visible = true
background2.visible = false
}else if(random_num < 50){
background1.visible = false
background2.visible = true
AddThis Social Bookmark Button