Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Animated Lights For Your Christmas Tree!, Swishmax - beginner
RedDragon
post Dec 13 2005, 03:46 AM
Post #1


insert coin
Group Icon
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:

Attached Image


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:

CODE
onFrame (1) {
    setLabel("off");
}
onFrame (2) {
    stop();
}
onFrame (3) {
    setLabel("on");
}
onFrame (4) {
    stop();
}


The entered code will result in this:



Now select the rectangle tool again, and add a new shape, with transparency set to 0%.

Convert it to a sprite and name it 'switch'.

Select the shape, copy it and then right click and select 'Paste in place'. You now have 2 hapes in exactly the same position.

Open the expert panel for the sprite and enter the following code:

CODE
onFrame (1) {
    setLabel("_1");
}
onFrame (2) {
    stop();
}
onFrame (3) {
    setLabel("_2");
}
onFrame (4) {
    stop();
}


Select the first shape, and enter this code:

CODE
on (press) {
    _parent.night.gotoAndPlay("off");
    gotoAndPlay("_1");
}


Add a remove effect on frame1, and a place effect on frame3

Select the first shape, and enter this code:

CODE
on (press) {
    _parent.night.gotoAndPlay("on");
    gotoAndPlay("_2");
}


Add a place effect on frame1, and a remove effect on frame3

This results in the following timeline:



And you're done!! If you followed all the steps correctly, you should now have something like the tree below biggrin.gif

Merry Christmas!

 
+Quote Post  Go to the top of the page
Eddie_K
post Dec 13 2005, 05:33 AM
Post #2


Hush now, I'm thinking...
Group Icon
Group: *Premier*
Posts: 3,977
Joined: 25-May 04
From: Heaven
Member No.: 47





I can feel the Christmas spirit already biggrin.gif

Simple and clean tut Red! Thanks Tip-Hat.gif
 
+Quote Post  Go to the top of the page
*D*
post Dec 13 2005, 09:59 AM
Post #3


Merry KissMoose
Group Icon
Group: Main Team
Posts: 15,990
Joined: 18-May 04
From: North Pole
Member No.: 2





Awesome results Rick and that tree is pretty kewl love the click and change. thumbsup.gif
 
+Quote Post  Go to the top of the page
alias.infnit
post Dec 14 2005, 02:54 PM
Post #4


Ludwig Wendzich
Group Icon
Group: *Premier*
Posts: 1,243
Joined: 13-July 05
From: New Zealand
Member No.: 5,345





That's great victory.gif Tip-Hat.gif
 
+Quote Post  Go to the top of the page
velvis
post Dec 20 2005, 08:53 PM
Post #5


All Swank. No Wank.
Group Icon
Group: Member
Posts: 505
Joined: 15-August 05
From: Mpls, MN • USA
Member No.: 6,184





ok but now tell me how to do it in FLASH!
 
+Quote Post  Go to the top of the page
Daisy__
post Dec 21 2005, 04:11 PM
Post #6


Comp Winner
Group Icon
Group: *Premier*
Posts: 104
Joined: 3-January 05
Member No.: 1,655





Wow!! That's a great tutorial and the result is thumbsup.gif Have to try it!


Thank you!
 
+Quote Post  Go to the top of the page
Faakher
post Dec 28 2005, 03:45 AM
Post #7


Regular Dot
Group Icon
Group: Member
Posts: 57
Joined: 28-December 05
Member No.: 8,750





its realy cool....
Thanks for sharing....

Faakher
 
+Quote Post  Go to the top of the page
erbe0279
post Mar 7 2006, 06:57 AM
Post #8


New Member
Group Icon
Group: Member
Posts: 3
Joined: 3-October 05
Member No.: 7,311





really great but I've noticed it to late :/
 
+Quote Post  Go to the top of the page
cleigh
post May 24 2006, 08:48 AM
Post #9


New Member
Group Icon
Group: Member
Posts: 3
Joined: 17-November 05
Member No.: 8,226





Great info that can be applied in other general animations. Thanks
 
+Quote Post  Go to the top of the page
RedDragon
post May 24 2006, 11:01 AM
Post #10


insert coin
Group Icon
Group: Main Team
Posts: 5,344
Joined: 24-May 04
From: Maastricht
Member No.: 35





You're welcome victory.gif
 
+Quote Post  Go to the top of the page

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

RSS Lo-Fi Version Time is now: 29th July 2010 - 11:05 PM
Package Holidays | ID card | Life Insurance | Broadband | Brazilian Property