Hi Jack,
Thanks for the prompt reply! Yes I guess it does make sense, and the workaround would give me what I want. I was looking at your code for your slideshow and I see that you do this to get a continuous scroll:
private function _enterFrameHandler(event:Event):void {
if (_thumbnailsContainer.hitTestPoint(this.stage.mouseX, this.stage.mouseY, false)) {
if (this.mouseX < _SCROLL_AREA) {
_destScrollX += ((_SCROLL_AREA - this.mouseX) / _SCROLL_AREA) * _SCROLL_SPEED;
if (_destScrollX > 0) {
_destScrollX = 0;
}
trace(_thumbnailsContainer.x);
TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
} else if (this.mouseX > _IMAGE_WIDTH - _SCROLL_AREA) {
_destScrollX -= ((this.mouseX - (_IMAGE_WIDTH - _SCROLL_AREA)) / _SCROLL_AREA) * _SCROLL_SPEED;
if (_destScrollX < _minScrollX) {
_destScrollX = _minScrollX;
}
TweenLite.to(_thumbnailsContainer, 0.5, {x:_destScrollX});
}
}
}
Interesting approach - I would think that restarting the Tween over and over again with the default easing would make it lurch slightly, but the thumbnail container moves smoothly. Hmmm, I guess since the restart is called on an enterframe event it only gets rendered once (and despite the fact that it would take 15 frames to play the tween at 30fps if it wasn't restarted) Why did you pick .5 as the timing? I take it that you just played with the timing number and the _SCROLL_SPEED to come up with something that looked right -its not easy to tell what your speed is, right? I set the time to 0 so that my scroll velocity was actually _SCROLL_SPEED, but I have a feeling that you picked that .5 number for a reason...
Just trying to understand better how it all works under the hood a bit.
-bob