那弹性的还真难做,试了一个下午没做出来.............你看看这样行不:
//图片总数:
total = 7;
//间距:
d = 25;
//图片宽:
w = 100;
//总长:
W = total*(w+d);
//图片变大变小的速度:
dScale = 10;
//在场景中加入图片:
for (i=1; i<=total; i++) {
this.attachMovie("pic", "pic"+i, i, {_x:i*(w+d)-W/2});
pic = this["pic"+i];
pic.gotoAndStop(i);
//鼠标放在图片上:
pic.onRollOver = function() {
this.onEnterFrame = function() {
//变大:
this._xscale = this._yscale += dScale;
//以该图片为基准调整距离:
pic0 = this;
distance(pic0);
//如果大到一定程度就停止变大:
if (this._xscale>200) {
this._xscale = this._yscale=200;
delete this.onEnterFrame;
pic0 = head;
}
};
};
//鼠标离开图片:
pic.onRollOut = function() {
this.onEnterFrame = function() {
//变小:
this._xscale = this._yscale -= dScale;
//以该图片为基准调整距离:
pic0 = this;
distance(pic0);
//如果小到一定程度就停止变小:
if (this._xscale<100) {
this._xscale = this._yscale=100;
delete this.onEnterFrame;
pic0 = head;
}
};
};
//用来建个类似双向链表的东东:
pic.prevPic = prevPic;
prevPic.nextPic = pic;
prevPic = pic;
}
//形成环链:
this.pic1.prevPic = this["pic"+total];
this["pic"+total].nextPic = this.pic1;
//
head = this.pic1;
tail = this["pic"+total];
//以链头为基准(用来调整距离):
pic0 = head;
//
function onEnterFrame() {
if (head._x<-W/2) {
head._x = tail._x+(tail._width+head._width)/2+d;
tail = head;
head = head.nextPic;
pic0 = head;
} else if (tail._x>W/2) {
tail._x = head._x-(tail._width+head._width)/2-d;
head = tail;
tail = tail.prevPic;
pic0 = head;
}
head._x += -_xmouse/20;
distance(pic0);
}
//--------------------------------------------------------------------------------------------
//以pic0为基准调整各幅画间距离的函数:
function distance(pic0) {
var pic = pic0;
while (pic != head) {
pic.prevPic._x = pic._x-(pic._width+pic.prevPic._width)/2-d;
pic = pic.prevPic;
}
pic = pic0;
while (pic != tail) {
pic.nextPic._x = pic._x+(pic._width+pic.nextPic._width)/2+d;
pic = pic.nextPic;
}
}
荒野乱斗国际版 (BrawlStars)最新版本v56.274
下载一波超人内置修改器菜单版 安卓版v1.0.2
下载敢达决战官方正版 安卓版v6.7.9
下载敢达决战 安卓版v6.7.9
下载继承了一座戏园子无限声望铜钱版 内置菜单最新版v1.7
继承了一座戏园子折相思版是游戏的破解版本,在该版本中为玩家提
山河半世橙光清软金手指版 无限鲜花v3.24
山河半世是一款超级好玩的橙光恋爱游戏,在游戏中玩家们需要扮演
蓬莱手游折相思版 安卓版v1.0.0
蓬莱免广告版是游戏的修改版本,在该版本中为玩家去除了广告,玩
当红影后橙光游戏破解版2025 最新版v1.0
当红影后橙光破解版是一款超级好玩的娱乐圈题材的橙光游戏,在这
忽然成了万人迷清软完结版 无限鲜花版v12.15
忽然成了万人迷破解版是一款非常好玩的男性向橙光游戏,在有一天