Looping problem... i think

i’m making what may become a band website (i’m actually just messing around). i ran into the prespective tutorials here and made what you see in the attachment. i want the “kringe” to do the shine affect every once in a while. i want it to shine randomly is what i’m saying. i can make it shine, but like i said, i want it to be random, i don’t know how to do this.

at the last frame of the “kringe” movie i make it go back to the first frame. in the first frame i want it to make a random number, if it’s a number i have chosen, it will move on to the next frame, if not, it will run the code again. this works in theory… fairly simple. if theres an easier way then this, tell me, other wise tell me what’s wrong with this code:

var penis;
penis = Math.round(Math.random()*(13-1));
if (penis=1){
nextFrame();
} else {
prevFrame();
}

if (penis=**=**1)

= is for asigning a value
== is for boolean comparing

Penis??? :!:

yes, penis :). i seriously couldn’t think of another word at the time… and thanks for the help, but it didn’t work. when the code isn’t there is continuously shines, when it is, it never shines.

fire two…

i’m a genius! i still don’t know what was wrong with it, but putting the loop code after the shine affect (which makes sense logically seeing as now all the "kringe"s shine upon loading) and mucking around made it work. this is what it looks like now…

var penis;
penis=Math.floor(Math.random() * (501 - 1) + 1);
if (penis>480){
gotoAndPlay(1);
} else {
gotoAndPlay(11);
}

and man does it ever have great results. i’ll be showing off an evolved version of this in some other section in the near future.

direct hit!