MongoDB Atlas is built for every app.

Start Building

Flash Script – Ray of Light

Georgina Laidlaw
Georgina Laidlaw
Published in
·Updated:

Share this article

SitePoint Premium
Stay Relevant and Grow Your Career in Tech
  • Premium Results
  • Publish articles on SitePoint
  • Daily curated jobs
  • Learning Paths
  • Discounts to dev tools

7 Day Free Trial. Cancel Anytime.


Download the sample files here.

1. Open a new movie with width=400 and height=100.

2. Create a text object with name of your choice. I used "ray of light".

3. Convert the text object to a movie clip, and give it the instance name "ray".

1071_tool1

4. Go to the timeline of the movie "ray".

5. Create a new layer above the existing layer.

1071_tool2

6. In the new layer, create a rectangle as shown below. Convert it to a graphic object.

1071_tool3

7. Create key frame at frame number 20. Then move the rectange to the end of the text at the 20th frame.

8. Give the graphic a motion tween.

9. Mask the layer.

10. Go back to the main time line.

11. Create a new layer, and drag an instance of the text movieclip from the library to the new layer.

12. In the new layer, insert the action:

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 ();

13. Run the movie. You’ll see the effect above! Congratulations!

Georgina has more than fifteen years' experience writing and editing for web, print and voice. With a background in marketing and a passion for words, the time Georgina spent with companies like Sausage Software and sitepoint.com cemented her lasting interest in the media, persuasion, and communications culture.

Share this article

Subscribe to our newsletter

Get the freshest news and resources for developers, designers and digital creators in your inbox each week

© 2000 – 2025 SitePoint Pty. Ltd.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.