我要Flash代码...

来源:百度知道 编辑:UC知道 时间:2024/06/05 23:52:07
博客使用,,,急用~~

这是一段制作类似雪花落下的动画的代码。一般将这段代码放在一个影片剪辑的上

onClipEvent (enterFrame) { //进入本帧即执行下列程序

this._x += Math.random ()*(this._xscale)/10 ; //设置本剪辑的x坐标
this._y += Math.random ()*(this._xscale)/10 ; //设置本剪辑的y坐标
if ( this._x > 500 ) {
this._x =0;
} //当它的x坐标大于500时,则设它的x坐标归0

if ( this._y > 330 ) {
this._y =0;
} //当它的y坐标大于330时,则设它的y坐标归0