Group: Main Team
Posts: 5,344
Joined: 24-May 04
From: Maastricht
Member No.: 35
Hi, in this tutorial I will show you how you can easily add some animated lights to your Christmas tree. As an extra you can add a function that switches off the lights, so you get a better view at the Christmas-lights.
End-result
Open a new document in SwishMax, and import the image of your choice. I went for a fake tree from this site
Once you've imported the tree, you can start drawing the lights. Several ways to do this, I choose the easy way, a circle with a radial gradient.
Select the Ellipse Tool
In the shape panel, fill in the following settings, pick a yellow of your choice:
Draw a small circle on the tree
In the outline panel, rightclick and select Convert - Convert to Sprite. Click on the sprite and add the following code in the Expert Panel:
CODE
onFrame (80) { gotoAndPlay(1); }
When the sprite is opened, you will see the circle in the timeline, add a fade-in and fade-out effect:
What you have so far is 1 light that will fade in and fade out in a continuous loop. Next step is to copy this sprite a number of times so that the entire tree gets filled with lights.
What you have now is a tree with lights that go on and off simultaneously. If that is what you want you're done, if you want them to appear in a more or less random way, add place effects in the main timeline. Do this by rightclicking in the main timeline, and selecting 'Place'.
As you can see, I added a stop effect after the last place-effect.
If you want to add a light switch, you can follow the next steps too, otherwise you are set to go!
------------
Select the rectangle tool
In the shape panel, select black with 75% transparancy
In the outline panel, rightclick and select Convert - Convert to Sprite. Go to the sprite panel and name the sprite 'night'. Move the sprite on top of the tree, but under the lights!
Enter the following code for this sprite in the expert panel: