Friday, December 31, 2010

Flash animation: rainy & snowy

This is a simple scenario of raining in a cemetery. It reminds me the day I had my 20 years old birthday, I went to the biggest cemetery of my city just want to find a place to think about my life of the 20 years. Not like America, the cemeteries in China are usually located in suburb with large area. I have been to many large or small cemeteries. Some in the villege, it was quite simple, only put a small stone on the mound, and you may even not notice it.  Some were on the hill, white tombstones cover the whole hill, it was so spectacular. I'd like to read the word on the tombs, which described their life. Cemetery is a quiet place for people to think. Think about life and death. Anyway, the code of raining in AS2 is below the demo. It is not a perfect raining code, you will find if you stay on this page for long time, the rain will become heavier :) .



The rainy is not completely controled by code, firstly, you should make a movie clip: draw a short line in grey vertically, make a tweened animation to let it drop a short distance(maybe 1/3 of the height of the stage about 10 frames, then make blank frames, on 25th frame, write code: stop(); in the actionscript window.Name this movie clip :"rain", copy about 8-10 this mc and put it on the stage anywhere.On the first frame of your animation, add the code below:
//code:
function rainy(){
 r=random(200)+20;//choose a bigger number to make different "droplet" has different depth
duplicateMovieClip("rain",r,r);// duplicate MovieClip called "rain"
a=random(550);//You can also set 550-20 to make sure the rain will not out of the stage
b=random(400);//You can also set 400-10 to make sure the rain will not out of the stage
if(a<=550){
   //if a (which is the _x of the droplet is still on the stage (my stage size is 550*400)
  a=a+20;
 }
 if(b<=50){
  b=b+10;
  //Since b is the height when the rain start to drop, it should not be too low
 }
setProperty(r, _x,a);
setProperty(r, _y,b);
//radom produce the rain droplets on the stage
updateAfterEvent();
//make the animation smoothly
r++;
if (r>220) {
clearInterval(raining);
//if the rain is too much, then reset the interval,the chance r=221 is not that big
}
}
raining=setInterval(rainy,120);
//execute this function every 0.12 seconds
The reason why the rain is become heavier is that my swf is only about 160 frames, every time it loops, the MC called "rain" will be duplicated again, the rain become more. There are many methods to control the number of droplet,like make a variable to record the times droplets are duplicated, and when it is more than a certain number, you could use clearInterval() function to reset it.

To View Flash Snowy Animation:
Flash animation : rainy & snowy (2)

Flash animation: Christmas & Birthday

Today, I posted the animation about festival. The angle is made when I took part in a computer competition, while the Christmas tree is made in Christmas last year. I plan to make a Christmas card by using these elements.

             

This birthday cake is made for my mother.Today is her birthday.Since I was 8 years old, I began to make birthday card and birthday gift to her till today no matter where I was in the world. Last year, I knitted a birthday cake for her which was one of my most statisfied gifts. I wish my Mom happy and safe everyday, and I want to do anything to realize it. This is my greatest wish in my whole life and the motivation for me to proceed.
Love u more than my life!
Happy birthday!


            

Thursday, December 30, 2010

Flash animation: Chinese Element " fan" & "scroll"

Today, I will show you two Flash effect about Chinese element. The first one is an "open fan" effect, when you press "open" button, the fan opens and four Chinese characters are written in calligraphy. This four characters are one word which means pursuing lofty ideals.This animation is really time consuming. In order to make the fan open smoothly, I need to animate it frame by frame. 
        


The second one is a scroll, in China, people usually use scroll to decorate ink paintings. In this scroll, if you click "open", it will show you a picture. On the picture is a crawling snail who is flying a kite maybe along the beach. Snail is an special animal. it moves slowly, but never give up. I think the first time I got this name was in my primary school. I was always late for the classes and my bag was always big. Three years ago, it became my nickname officially."Little Snail's Workshop" was also the studio's name when I participated in some competitions. I love snail!
This two flash reflect my characters and my dream.


       

Tuesday, December 28, 2010

Flash animation: ignite a bomb

This is a Flash effect to make a bomb, if you think it is useful, you can try to imitate it.  Have fun! :)