大家看看也许有用的,非常漂亮的效果
点击浏览该文件
1.新建一MC,画一个类似这样的“光”的效果图,很简单的
2。在第一帧上面输入AS:
点击浏览该文件
1.新建一MC,画一个类似这样的“光”的效果图,很简单的
2。在第一帧上面输入AS:
_quality="LOW"
function go(){
nowy = attachMovie("mc","m"+a,10+a)
nowy._x=200
nowy._y=150
nowy._alpha=30
nowy._rotation=random(360)
nowy._xscale=nowy._yscale=40+random(100)
nowy.onEnterFrame = function(){
this._rotation+=Math.sin(this.z+=.3)*4
this._xscale=this._yscale+=Math.sin(this.o+=.2)*10
this.col=new Color(this);
this.col.setRGB(127*Math.sin(this.r+=.8)+128<<16|127*Math.sin(this.g+=.2)+128<<8|127*Math.sin(this.b+=.1)+128);
}
a++
if (a>30) clearInterval(id)
}
var id = setInterval(go,250)
3:CTRL+回车,完了,很简单吧
function go(){
nowy = attachMovie("mc","m"+a,10+a)
nowy._x=200
nowy._y=150
nowy._alpha=30
nowy._rotation=random(360)
nowy._xscale=nowy._yscale=40+random(100)
nowy.onEnterFrame = function(){
this._rotation+=Math.sin(this.z+=.3)*4
this._xscale=this._yscale+=Math.sin(this.o+=.2)*10
this.col=new Color(this);
this.col.setRGB(127*Math.sin(this.r+=.8)+128<<16|127*Math.sin(this.g+=.2)+128<<8|127*Math.sin(this.b+=.1)+128);
}
a++
if (a>30) clearInterval(id)
}
var id = setInterval(go,250)
博客介绍了在Flash中创建漂亮“光”效果的方法。先新建MC画“光”效果图,接着在第一帧输入AS代码,代码中定义了go函数,利用随机数设置对象属性,还包含动画变化逻辑,最后按CTRL + 回车完成操作。

9644

被折叠的 条评论
为什么被折叠?



