概要://雪花y坐标控制在舞台上的0-200处随机出现; xh.alpha=Math.random()*1+0.2; //雪花的随机透明度; xh.scaleX=Math.random()*0.5+0.5; //随机控制雪花在x的宽度; xh.scaleY=Math.random()*0.5+0.5; //随机控制雪花在y的宽度; } sj.start();//时间开始;雪景代码: var sj:Timer =new Timer(Math.random()*300+100,100); sj.addEventListener(TimerEvent.TIMER ,sjcd); function sjcd(event:TimerEvent) { var xh:xh_mc=new xh_mc(); addChild(xh); xh.x=Math.random()*550; xh.y=Math.random()*200; xh.alpha=Math.random()*1+0.2; xh.scale
AtionScrip 3.0制作雪花飘飘动画,标签:flash教程制作,flash动画教程,http://www.85jc.com雪景代码:
var sj:Timer =new Timer(Math.random()*300+100,100);
sj.addEventListener(TimerEvent.TIMER ,sjcd);
function sjcd(event:TimerEvent) {
var xh:xh_mc=new xh_mc();
addChild(xh);
xh.x=Math.random()*550;
xh.y=Math.random()*200;
xh.alpha=Math.random()*1+0.2;
xh.scaleX=Math.random()*0.5+0.5;
xh.scaleY=Math.random()*0.5+0.5;
}
sj.start();
四、关闭动作窗口测试保存。
最新更新