万卷书   首页 > 电脑书籍 > Flash > FLASH文字特效六合一
 
特效3(mc random x&y)

a=this._x;

b=this._y;

if (Number(a)!=_root.rancon:x[i] or Number(b)!=_root.rancon:y[i]) {

this._x=this._x+(_root.rancon:x[i]-Number(a))/15;

this._y=this._y+(_root.rancon:y[i]-Number(b))/15;

//read the origan values in the rancon mc and set step number!

chax=Math.abs(this._x-_root.rancon:x[i])

chay=Math.abs(this._y-_root.rancon:y[i])

if(Number(chax)<1 && Number(chay)<1){

this._x=_root.rancon:x[i];

this._y=_root.rancon:y[i];

}

this._alpha = this._alpha+5;

gotoAndPlay (2);

} else {

this._alpha = 100;

stop ();

}

//通过利用random()随机函数控制字母的_y和_x属性,来达到字母随机出现在舞台上,//并渐显的效果

上一页 下一页