飞机行李带上飞机吗:谁教我黑客帝国那个数据流的特效

来源:百度文库 编辑:神马品牌网 时间:2024/05/08 12:33:29
我是菜鸟,尽量说的详细一点..最好有视频教程的,网址也行.
我要更加详细的谢谢

再现《黑客帝国》数字流特效
1.新建flash文档,舞台大小设置为550像素*400像素,背景颜色选择黑色,帧频率设置为30。
2.画一个竖形的长方形动态文本框,注意要足够长,即能放下后面所设置的数字流长度。打开属性面板,将变量名设为“shuzi”。转换为电影剪辑。在电影剪辑时间轴第一帧添加代码:
this.onEnterFrame = function() {
//反复执行下面代码。
if (this._y<0) {
this._y = 390;
}
if (this._y>400) {
this._y = 10;
}
//如果数字流超过了舞台上,下界,则分别回到舞台的下,上端。
ysudu = 5;
this._y += ysudu;
//数据流以速度为5个像素向下运动。
shuzi=random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10)+"\r"+random(10);
//数据流的内容。即9个纵向排列的在0-9随机闪动的数字。
};
3.打开库面板,右键点选库面板中的影片剪辑,打开链接属性对话框,钩选“为动作脚本导出选项”,在标识符一栏中输入“wenzi”
4. 回到主场景,在舞台时间轴第一帧添加代码。
_root.onEnterFrame = function() {
attachMovie("wenzi", "wenzi"+i, i++);
//反复附加电影剪辑wenzi到舞台上。
_root["wenzi"+i]._x = Math.random()*550;
_root["wenzi"+i]._y = Math.random()*400;
//在舞台范围内随机设置附加的电影剪辑的x,y坐标值。
_root["wenzi"+i]._xscale = _root["wenzi"+i]._yscale=Math.random()*200;
//在0-200范围内设置附加电影剪辑的x,y缩放比例。
_root["wenzi"+i]._alpha = random(100);
//随机设置附加电影剪辑的透明值
if (i>200) {
i = 1;
}
//保证舞台上不超过200个数字流电影剪辑。因为对于深度值相同的电影剪辑,新附加的电影剪辑会覆盖原来存在的电影剪辑。
};
5.如果大家使用的是FlashMX,直接发布即可

<!开始----开始,01降落>
<script language="JavaScript">
<!--
if (document.all){
Cols=9;
Cl=24;//Space's are included so real length is 48!
Cs=10;
Ts=10;
Tc='#009933';
Tc1='#00FF00';
MnS=20;
MxS=30;
I=Cs;
Sp=new Array();S=new Array();Y=new Array();
C=new Array();M=new Array();B=new Array();
RC=new Array();E=new Array();Tcc=new Array(0,1);
document.write("<div id='Container' style='position:absolute;top:0;left:-"+Cs+"'>");
document.write("<div style='position:relative'>");
for(i=0; i < Cols; i++){
S[i]=I+=Cs;
document.write("<div id='A' style='position:absolute;top:0;font-family:Arial;font-size:"
+Ts+"px;left:"+S[i]+";width:"+Ts+"px;height:0px;color:"+Tc+";visibility:hidden'></div>");
}
document.write("</div></div>");

for(j=0; j < Cols; j++){
RC[j]=1+Math.round(Math.random()*Cl);
Y[j]=0;
Sp[j]=Math.round(MnS+Math.random()*MxS);
for(i=0; i < RC[j]; i++){
B[i]='';
C[i]=Math.round(Math.random()*1)+' ';
M[j]=B[0]+=C[i];
}
}
function Cycle(){
Container.style.top=window.document.body.scrollTop;
for (i=0; i < Cols; i++){
var r = Math.floor(Math.random()*Tcc.length);
E[i] = '<font color='+Tc1+'>'+Tcc[r]+'</font>';
Y[i]+=Sp[i];

if (Y[i] > window.document.body.clientHeight){
for(i2=0; i2 < Cols; i2++){
RC[i2]=1+Math.round(Math.random()*Cl);
for(i3=0; i3 < RC[i2]; i3++){
B[i3]='';
C[i3]=Math.round(Math.random()*1)+' ';
C[Math.floor(Math.random()*i2)]=' '+' ';
M[i]=B[0]+=C[i3];
Y[i]=-Ts*M[i].length/1.5;
A[i].style.visibility='visible';
}
Sp[i]=Math.round(MnS+Math.random()*MxS);
}
}
A[i].style.top=Y[i];
A[i].innerHTML=M[i]+' '+E[i]+' ';
}
setTimeout('Cycle()',20)
}
Cycle();
}
// -->
</script>
<!结束--------结束>

这个是网上最经典的一个做数字雨的教程
前期用PS,后期合成用AE,整合在一张比较大的图片上了,你需耐心一些

http://www.lifu.com.cn/wz/list.asp?id=1309