正在阅读:Flash制作漂亮的三重卷动相册特效动画Flash制作漂亮的三重卷动相册特效动画

2007-08-10 10:13 出处:PConline 作者:闪电儿 责任编辑:chenzhenjia

  然后制作一个遮照影片剪辑。

Flash制作漂亮的三重卷动相册特效动画 图5
图5

  然后建立一个Action层。

Flash制作漂亮的三重卷动相册特效动画 图6
图6

  第一帧的ActionScript如下:

  order = [["0", "1", "2", "3", "4", "5", "6", "7"], 
  ["6", "0", "5", "7", "3", "1", "2", "4"], 
  ["4", "7", "5", "2", "0", "3", "6", "1"]];
  for (var j = 0; j<order.length; j++) {
  var i = this.createEmptyMovieClip("images"+j, j);
  var m = this.attachMovie("mask", "mask"+j, 100+j);
  m._x = 224
  target0=target1=target2=223;
  m._y = 57+(90*j);
  i._y = 57;
  i.setMask(m);
  for (var k = 0; k<order[0].length; k++) {
  var img = i.attachMovie("image"+order[j][k], "image"+k, 1000+k);
  img._x = (img._width*k);  
  var thumb = this["thumb"+order[j][k]];  
  thumb["pos"+j] = target1+(k*-img._width);
  thumb.onPress = function() {
  _root.target0 = this.pos0;
  _root.target1 = this.pos1;
  _root.target2 = this.pos2;
  };
  thumb.onRollOver = function() {
  this._alpha = 60;
  };
  thumb.onRollOut = function() {
  this._alpha = 100;
  };
  }
  }
  target0 = thumb4.pos0;
  target1 = thumb4.pos1;
  target2 = thumb4.pos2;
  speed = 10;
  this.onEnterFrame = function() {
  images0._x += ((target0)-images0._x)/speed;
  images1._x += ((target1)-images1._x)/speed;
  images2._x += ((target2)-images2._x)/speed;
  };

  按Ctrl+Enter测试吧!

 

flash剧场

键盘也能翻页,试试“← →”键

关注我们

最新资讯离线随时看 聊天吐槽赢奖品