I can’t figure out why this code does not work properly. but I am sure it is something obvious that I can’t wrap my tiny brain around. Even though I leave the _x and _y corodinates for the gradient_mc undefined, it still slides to the left on the intitial rollover. The subsequent rollovers it stay in one place, working fine. And the info_mc will only move along the x corrdinates but it does (at least) fadein correctly. I am really confused. Thanks for any guidance.
MovieClip.prototype.doTween = function() {
var elapsedTime = getTimer()-this.startTime;
var k = elapsedTime/this.duration;
if (k>1) {
k = 1;
this.onEnterFrame = undefined;
}
k = kk(3-2k);
this._alpha = this.startA+(this.deltaAk);
this._x = this.startX+(this.deltaXk);
this._y = this.startY+(this.deltaYk);
};
MovieClip.prototype.startTween = function(fade, targety, targetx, seconds) {
this.startTime = getTimer();
this.duration = seconds*1000;
this.startA = this._alpha;
this.targetA = fade;
this.startX = this._x;
this.targetX = targetx;
this.startY = this._y;
this.targetY = this._y
this.deltaA = this.targetA-this.startA;
this.deltaX = this.targetX-this.startX;
this.deltaY = this.targetY-this.startY;
this.onEnterFrame = this.doTween;
};
mc.onRollOver = function() {
this.startTween(30, undefined, undefined, 1.5);
};
mc.onRollOut = function() {
this.startTween(0, undefined, undefined, .5);
};
info_mc.onEnterFrame = function() {
this.startTween(100, 300, 100, 1.5);
}