22-11-2007, 21:18
|
|
|
חבר מתאריך: 22.11.07
הודעות: 1
|
|
גלריה נגללת
שלום לכולם,
יש לי קוד לגלריה נגללת, מצורף בהמשך.
הבעיה: הגלילה לא נעצרת...
האם יש איזו דרך שכשהעכבר על הסרט תהיה גלילה וכשיורדים עם העכבר זה ייעצר?
המון המון תודה..
הקוד:
stop();
pic1.onRollOver = pic1Over;
function pic1Over() {
this.onEnterFrame = scrollpic1;
delete this.onRollOver;
}
var b = stroke.getBounds(_root);
function scrollpic1() {
if(_xmouse<b.xMin || _xmouse>b.xMax || _ymouse<b.yMin || _ymouse>b.yMax){
this.onRollOver = pic1Over;
delete this.onEnterFrame;
}
if (pic1._x >= 4650) {
pic1._x = 4650;
}
if (pic1._x <= -3970) {
pic1._x = -3970;
}
var xdist = _xmouse - 450;
pic1._x += -xdist / 20;
}
|