主要是以远近三维的一个应用,欢迎观看与指导,谢谢,有代码,可以讨论(两个一样的,只是方向的改变)
----------应用1---------------
---代码如下-----------------
myArray=["小刀记事","http://yuheduo.5dblog.com","QQ:113526217","有空常来","小刀闪闪","ActionScript学习","单位:桃园中学","三维应用","我的博客"];
move=function(){
this._xscale=this._yscale-=this.v;
this._x+=(200-this._x)/10;
this._y+=(50-this._y)/10;
if(this._x==200||this._y==100||this._xscale<=10)this.removeMovieClip();
}
var i=1;
myonEnterFrame=function(){
var mc:MovieClip=txt.duplicateMovieClip("txt"+i,i,{_x:random(500)+50,_y:Math.random()*400+200,_xscale:500,_yscale:500});
var mycolor:Color=new Color(mc);
mycolor.setRGB(Math.random()*0xffffff);
mc.v=Math.random()*20+5;
//trace(mc._x);
var len=myArray.length;
//trace(len+"="+myArray[random(len)]);
mc.mytext.text=myArray[random(len)];
mc.onEnterFrame=move;
//trace(i);
i<50?i++:i=0;
}
interval_id=setInterval(myonEnterFrame,200);
----------应用2---------------
-----代码与应用1差不多,改变一下方向就好了。
----------应用1---------------
---代码如下-----------------
myArray=["小刀记事","http://yuheduo.5dblog.com","QQ:113526217","有空常来","小刀闪闪","ActionScript学习","单位:桃园中学","三维应用","我的博客"];
move=function(){
this._xscale=this._yscale-=this.v;
this._x+=(200-this._x)/10;
this._y+=(50-this._y)/10;
if(this._x==200||this._y==100||this._xscale<=10)this.removeMovieClip();
}
var i=1;
myonEnterFrame=function(){
var mc:MovieClip=txt.duplicateMovieClip("txt"+i,i,{_x:random(500)+50,_y:Math.random()*400+200,_xscale:500,_yscale:500});
var mycolor:Color=new Color(mc);
mycolor.setRGB(Math.random()*0xffffff);
mc.v=Math.random()*20+5;
//trace(mc._x);
var len=myArray.length;
//trace(len+"="+myArray[random(len)]);
mc.mytext.text=myArray[random(len)];
mc.onEnterFrame=move;
//trace(i);
i<50?i++:i=0;
}
interval_id=setInterval(myonEnterFrame,200);
----------应用2---------------
-----代码与应用1差不多,改变一下方向就好了。
回复Comments
{commenttime}{commentauthor}
{CommentUrl}
{commentcontent}