This is a little tricky to explain, so here it goes…
Basically, I have three tabs, the rollout and rollover work perfect, I’m using this code to make transition from over and out smooth:
On the button:
on (rollOver) {
portfolio.goBack = false;
portfolio.play();
}
on (rollOut) {
portfolio.goBack = true;
}
on (press) {
[portfolio.gotoAndStop(51);
}
On frame one:
MovieClip.prototype.rewind = function () { if (goBack && (_currentframe>1)) {gotoAndStop (_currentframe-1);}};
And on the movie clip:
onClipEvent (enterFrame) {
this.rewind();
}
Inside the movie clip, has a bunch of tweens, and on frame one I declare the variable and get the y position of another movie clip (the one that is moving in the tweens) It’s instance name is portfolio_graph.
On frame 1:
var y_portfolio; // y position of the movie clip that I’m tweening
y_portfolio = portfolio_graph._y;
And on frame 51 is where it should go when it’s pressed.
// Y Starting point
hosting_graph._y = y_hosting;
// Y Ending point
endPosy = -31.8;
// X Start
hosting_graph._x = -52.1;
// Speed of decel
accelFactor = 10;
currentPosy = hosting_graph._y;
diffPosy = endPosy-currentPosy;
accely = diffposy/accelFactor;
hosting_graph._y = hosting_graph._y+accely;
Ok, now the problem.
When I press, it disapears the first time. When I do move my mouse over another button ( each button affects the other two ) portfolio_graph moves to roughly -17 ( eye-balled it )… actually looking at it again, it looks like its playing from halfway through the animation and in reverse. Hmmm.
Did I go wrong in the code somewhere? If the .fla would help, I’ll give it to you, no problem. Thanks in advance,
Anton Doos