Rain Animation in Flash using AS3.0 - Flash Tutorials

Опубликовано: 15 Март 2026
на канале: VerkkoNet
4,445
30

In this video tutor you will learn the basic concepts of creating reusable movieclips and rain animation.

Website: http://samsolomonprabu.com/

Here's the code:
--------------------------
import flash.display.MovieClip;
import flash.utils.Timer;
import flash.events.TimerEvent;

var myTimer:Timer = new Timer(1);
myTimer.addEventListener(TimerEvent.TIME­R, onTick);

function onTick(e:TimerEvent):void{

var rainObj:Rain = new Rain();
stage.addChild(rainObj);

rainObj.x = stage.stageWidth * Math.random() - 100;
rainObj.y = stage.stageHeight * Math.random() - 100;

}

myTimer.start();