当前位置:首页>网络学院>网页制作>Flash教程>文章内容

Flash制作蜻蜓飞舞动画实例教程

[ 来源:http://www.it55.com | 作者: | 时间:2007-11-05 | 收藏 | 推荐 ] 【


};
_root.fly1.onEnterFrame = function () {
 this.smoothMove (speed, transp1._x, _root.transp1._y);
 this.rotateTo (_root.transp1._x, _root.transp1._y);
};
_root.transp2.onEnterFrame = function () {
 if (random (probability) == 0) {
  target2X = random (scene_width);
  target2Y = random (scene_height);
 }
 this._visible = 0;
 this.smoothMove (speed, target2X, target2Y);
};
_root.fly2.onEnterFrame = function () {
 this.smoothMove (speed, transp2._x, _root.transp2._y);
 this.rotateTo (_root.transp2._x, _root.transp2._y);
};
_root.transp3.onEnterFrame = function () {
 if (random (probability) == 0) {
  target3X = random (scene_width);
  target3Y = random (scene_height);
 }
 this._visible = 0;
 this.smoothMove (speed, target3X, target3Y);
};
_root.fly3.onEnterFrame = function () {
 this.smoothMove (speed, transp3._x, _root.transp3._y);
 this.rotateTo (_root.transp3._x, _root.transp3._y);
};
_root.transp4.onEnterFrame = function () {
 if (random (probability) == 0) {
  target4X = random (scene_width);
  target4Y = random (scene_height);
 }
 this._visible = 0;
 this.smoothMove (speed, target4X, target4Y);
};
_root.fly4.onEnterFrame = function () {
 this.smoothMove (speed, transp4._x, _root.transp4._y);
 this.rotateTo (_root.transp4._x, _root.transp4._y);
};
_root.transp5.onEnterFrame = function () {
 if (random (probability) == 0) {
  target5X = random (scene_width);
  target5Y = random (scene_height);
 }
 this._visible = 0;
 this.smoothMove (speed, target5X, target5Y);
};
_root.fly5.onEnterFrame = function () {
 this.smoothMove (speed, transp5._x, _root.transp5._y);
 this.rotateTo (_root.transp5._x, _root.transp5._y);
};

  10.时间轴最终效果如下图所示:

  实例讲解完成!

(编辑:IT资讯之家 www.it55.com

返回顶部
共2页: 上一页 [1] 2 下一页  

网友评论

[以下评论为网友观点,不代表本站。请自觉遵守互联网相关政策法规,所有连带责任均有评论者自负。]
[不超过250字]