This content has been marked as final.
Show 4 replies

1. Re: How to have symbols play at random intervals?
resdesign Aug 26, 2014 10:28 AM (in response to jrkstevenson)Here is how I would show at a different interval.
function doSomething() {
var num = Math.floor((Math.random()*300));
var num2 = Math.floor((Math.random()*200));
sym.$("Symbol_1").css({
"left":num,
"top":num2
});
}
(function loop() {
var rand = Math.round(Math.random() * (300)) + 500;
setTimeout(function() {
doSomething();
loop();
}, rand);
}());

2. Re: How to have symbols play at random intervals?
resdesign Aug 26, 2014 10:28 AM (in response to jrkstevenson)sample here: random gopher.zip  Box

3. Re: How to have symbols play at random intervals?
jrkstevenson Aug 26, 2014 12:25 PM (in response to resdesign)Thank you so much!
I now have it so that when you click the symbol it adds 10 points to a scoring system,
I'm trying to have that if you reach 100 then you win, using an if statement but I don't know what I'm doing wrong:
if(score = 100){
sym.stop("win");
}

4. Re: How to have symbols play at random intervals?
eliverrang Aug 27, 2014 4:34 AM (in response to jrkstevenson)Needs double equals sign:
if(score == 100){
sym.stop();
}
Peter Small