I have a script that I used in an older version of a site. I am now tweaking and adding, and want to publish the new version in flash 8. However, i’m getting some unwanted results when i publish in flash 8 rather than flash 6. Can anyone have a look and tell me why?!
numDisplayed = 6;
currIndex = 0;
xPos = 60;
yPos = 430;
speed = 11;
for (var i = currIndex; i<currIndex+numDisplayed; i++) {
var index = i%myClips.length;
myClips[index]._y = yPos;
myClips[index]._x = myClips[index].targx=xPos+clip._width*(i-currIndex);
}
//MovieClip.prototype.easeToTarget = function() {
easeToTarget = function() {
var dx = this.targx-this._x;
this._x += dx/speed;
if (Math.abs(dx)<1) {
this._x = this.targx;
delete this.onEnterFrame;
}
};
MovieClip.prototype.moveMe = function(pi_dir) {
this.onEnterFrame = easeToTarget;
this.targx += pi_dir*this._width;
};
MovieClip.prototype.appearRight = function() {
this.onEnterFrame = easeToTarget;
this._y = ypos;
this._x = xpos+mask._width+300;
this.targx = xpos+(numDisplayed-1)*this._width;
};
MovieClip.prototype.disappearLeft = function() {
this.onEnterFrame = easeToTarget;
this._y = ypos;
this.targx = xpos-500;
};
MovieClip.prototype.appearLeft = function() {
this.onEnterFrame = easeToTarget;
this._y = ypos;
this._x = xpos-300;
this.targx = xpos;
};
MovieClip.prototype.disappearRight = function() {
this.onEnterFrame = easeToTarget;
this._y = ypos;
this.targx = xpos+mask._width+500;
};
function moveit(pi_incr) {
if (pi_incr == -1) {
myClips[currIndex].disappearLeft();
for (i=currIndex+1; i<currIndex+numDisplayed; i++) {
var index = i%myClips.length;
myClips[index].moveMe(pi_incr);
}
var indexClipToAppear = (currIndex+numDisplayed)%myClips.length;
myClips[indexClipToAppear].appearRight();
} else {
var indexCliptoDisappear = (currIndex+numDisplayed-1)%myClips.length;
myClips[indexCliptoDisappear].disappearRight();
for (i=currIndex; i<currIndex+numDisplayed-1; i++) {
var index = i%myClips.length;
myClips[index].moveMe(pi_incr);
}
var indexClipToAppear = (currIndex+myClips.length-1)%myClips.length;
myClips[indexClipToAppear].appearLeft();
}
// Update the index of the first visible item
currIndex = (currIndex+(myClips.length-pi_incr))%myClips.length;
}
this.leftie.onRelease = function() {
moveit(1);
};
this.rightie.onRelease = function() {
moveit(-1);
};
THanks