CD-Ren by『光碟奇人录』

我的日历
最新评论
友情链接
访问计数

+------------------------------------------------------------------------------------------------------+

AS小效果制作

   flash相关2004-12-12 4:23
梦境效果的制作(AS)
观看效果

0、打开flashmx2004,执行插入>>新建元件命令,新建影片剪辑,命名为“元件1”,点击右下角的“高级”按钮,在“为动作脚本导出”前打勾,然后设置其“标识符”为“mc”

1:在MC中画一个红色的光环,如图: 本贴包含图片附件:
2:在第一帧输入下面的代码:

_quality="LOW"//设置低质播放
function go(){//创建go()自定义函数

nowy = attachMovie("mc","m"+a,10+a)//从库中加载mc
nowy._x=200//设置_x属性为200
nowy._y=150//_y属性为150
nowy._alpha=10//透明度为10
nowy._rotation=random(360)//随机旋转360度
nowy._xscale=nowy._yscale=40+random(100)//比例随机改变,为40~139
nowy.onEnterFrame = function(){
this._rotation+=Math.sin(this.z+=.3)*10//不断改变自身的旋转度
this._xscale=this._yscale+=Math.sin(this.o+=.2)*20//不断改变自身的缩放比例
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++//变量a自加
if (a>30) clearInterval(id)
}

var id = setInterval(go,250)




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)
标签集:TAGS:
回复Comments()点击Count()

回复Comments

{commenttime}{commentauthor}

{CommentUrl}
{commentcontent}

+------------------------------------------------------------------------------------------------------+


   Designed by ArPan     Powered by 5DBlog