5D艺术网首页
商城
|
资讯
|
作品
|
博客
|
教程
|
论坛
登录
注册
加为好友
发短消息
来自:
性别:秘密
最后登录:2007-04-12
http://cd-ren.5d.cn/
首页
|
新闻
|
话题
|
博客
|
相册
|
艺术作品
|
社交关系
|
留言板
|
社交圈
2004/12/12 | AS小效果制作
类别(flash相关)
|
评论
(0)
|
阅读(62)
|
发表于 04: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)
0
评论
Comments
日志分类
首页
[178]
日记/收藏
[19]
我的作品
[11]
flash相关
[13]
图片相关
[17]
动画相关
[16]
风采文章
[16]
网络风
[75]
音乐/影视
[11]