Action Script Alpha Effect

Just a small modification to the cleaner code for the alpha effect given by suprabeener in the best of Kirupa section(for those who havent been to the section…check it out b4)\r\ronClipEvent (enterFrame) \r{\r&nbsp &nbsp &nbsp &nbsp if (this._alpha >= 100) \r&nbsp &nbsp &nbsp &nbsp {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp diff = -5;\r&nbsp &nbsp &nbsp &nbsp } \r&nbsp &nbsp &nbsp &nbsp if (this._alpha <= 0) \r&nbsp &nbsp &nbsp &nbsp {\r&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp diff = +5;\r&nbsp &nbsp &nbsp &nbsp }\r&nbsp &nbsp &nbsp &nbsp this._alpha += diff;\r}\r\rThe above code is what worked for me. If I dont use the less than and greater than signs the circle just fades out and stays faded out and vice versa.\r\rPS: hey Supra, how come u know flash better than the back of ur palm ( I have been reading a lot of ur stuff on these forums). Do u spend all day with Flash only? I wanna b like u…cooool

or even better:\r\ronClipEvent(load) {\rdiff = 5;\r}\ronClipEvent(enterFrame) {\rif (_alpha >= 100 || _alpha <= 0) {\rdiff = -diff;\r}\r_alpha += diff;\r}

ouch… tight

or even better:

 \r\ronClipEvent(enterFrame){\r\r&nbsp &nbsp &nbsp &nbsp _alpha = Math.abs(-100+(a+=5)%200);\r\r}

OUCH!!! TIGHTER THAN A VIRGIN!!\r\rsorry, that was uncalled for

still trying to get a good grasp of the actionscript things…\r\r\rwuts the % do?

% is the modulo operator, results in the remainder of any two numbers.\rExample: 10%2 returns 0,\r10%3 returns 1…\r\rVery usefull to determine if a number is even or odd: number%2 is 0 when it’s even.\r\rJust use trace (number%another number) and check the result.

LOL \r\r(OUCH!!! TIGHTER THAN A VIRGIN!!\r\rsorry, that was uncalled for )\r\r\rheheheh …Next !