# Light Ray Effect Help

**URL:** <https://forum.kirupa.com/t/light-ray-effect-help/169948>\
**Category:** flash\
**Created:** [November 21, 2005, 1:36pm UTC](https://forum.kirupa.com/t/light-ray-effect-help/169948 "2005-11-21T13:36:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rekha](https://avatars.discourse-cdn.com/v4/letter/r/6a8cbe/32.png) [@Rekha](https://forum.kirupa.com/u/Rekha)\
**Post date:** [November 21, 2005, 1:36pm UTC](https://forum.kirupa.com/t/light-ray-effect-help/169948/1 "2005-11-21T13:36:39Z")

</div>

I am learning action script. I am following the code from a site in which a text has light rays effect. But it the light ray effect is continuing even after the end of the movie. Please help me in stopping the light ray effect of the text. The code for the light ray effect is as follows: i = “1”;  
alpha = “0.8”;  
maxlight = “20”;  
while (Number(i)\<=Number(maxlight)) {  
duplicateMovieClip (“ray0”, “ray” add i, 800-i);  
setProperty ("/ray" add i, \_xscale, getProperty("/ray" add (i-1), \_xscale)+i_alpha);  
setProperty ("/ray" add i, \_yscale, getProperty("/ray" add (i-1), \_yscale)+i_alpha);  
setProperty ("/ray" add i, \_alpha, 10-i\*(0.5/50));  
i = Number(i)+1;  
}  
setProperty (“ray0”, \_visible, “0”);  
stop ();

Thank You.
