flash点滴
上一篇 /
下一篇 2008-05-13 15:48:31
/ 个人分类:Flash设计
做水泡效果
for(i=0);i<40;i++){ //控制水泡的数量
duplicateMovieClip("shui","shui"+i,i); //复制水珠
temp=eval("shui"+i)
with(temp){ //设置属性
_x=random(400) //坐标
_y=random(150)+300
_xscale=_yscale=random(40)+20 //缩放
_alpha=random(40)+60 //透明度
}
shui._visible=false //设置原来的mc不显示
}
//以上是复制一定数量的水泡,设置它们位于场景底部的一定的位置
选择shui影片剪辑,打开“动作”面板,添加AS动作语句:
onClipEvent(load){
speed=random(5)+3
}
onClipEvent(enterFrame){
this._y-=speed
this._x+=random(3)-random(3)
if(this._y<-10{
this._y=random(310)-10
}
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: