Hey kirupa! Reg. AS tricks!

Hey!

Ilyaslamasse agreed with me on the fact, that (probably) not many flash users know how to use the % operator…

Maybe you could throw this in your AS tricks…?

(any integer with a “%2” attached can destinguish odd numbers from even numbers…

Say i have the # 45… 45%2 = 1 = (odd number)

and # 46… 46%2 = 0 = (even number)

then just throw in an “if” statement to tell the 1 and 0 apart…! :slight_smile:

(the odd/even trick was just 1 idea…)

Hey eilsoe,
I’ll add that in tomorrow. Yeah, that sounds eerily similar to the Mod operator in C++ or VB.

Cheers!
Kirupa :rambo:

Good idea yes, but maybe you should talk about the % operator a little bit more generally too. For instance, Supra used it in his gallery code brilliantly. Just an idea.

pom :asian: