Hi,
I wrote this code that isn't the smoothest and I'd like to see if I can get some direction on making this smoother. Maybe using the FuseKit Tween.
Here's my code.
CODE
this.onEnterFrame = function(){
if (scrollMoviesUp){
body.scrollingPane.TwoScrollingMovies.scrolling_1._y+=10;
body.scrollingPane.TwoScrollingMovies.scrolling_2._y+=10;
}
if (scrollMoviesDown){
body.scrollingPane.TwoScrollingMovies.scrolling_1._y-=10;
body.scrollingPane.TwoScrollingMovies.scrolling_2._y-=10;
}
if (body.scrollingPane.TwoScrollingMovies.scrolling_1._y >
body.scrollingPane.ScrollingPaneMask._y+body.scrollingPane.ScrollingPaneMask._height
){
body.scrollingPane.TwoScrollingMovies.scrolling_1._y =
body.scrollingPane.TwoScrollingMovies.scrolling_2._y-body.scrollingPane.TwoScrollingMovies.scrolling_1._height-10;
}
if (body.scrollingPane.TwoScrollingMovies.scrolling_2._y >
body.scrollingPane.ScrollingPaneMask._y+body.scrollingPane.ScrollingPaneMask._height
){
body.scrollingPane.TwoScrollingMovies.scrolling_2._y =
body.scrollingPane.TwoScrollingMovies.scrolling_1._y-body.scrollingPane.TwoScrollingMovies.scrolling_2._height-10;
}
if ( (body.scrollingPane.TwoScrollingMovies.scrolling_1._y + body.scrollingPane.TwoScrollingMovies.scrolling_1._height) <
body.scrollingPane.ScrollingPaneMask._y ){
body.scrollingPane.TwoScrollingMovies.scrolling_1._y =
body.scrollingPane.TwoScrollingMovies.scrolling_2._y+body.scrollingPane.TwoScrollingMovies.scrolling_2._height+10;
}
if ( (body.scrollingPane.TwoScrollingMovies.scrolling_2._y + body.scrollingPane.TwoScrollingMovies.scrolling_2._height) <
body.scrollingPane.ScrollingPaneMask._y ){
body.scrollingPane.TwoScrollingMovies.scrolling_2._y =
body.scrollingPane.TwoScrollingMovies.scrolling_1._y+body.scrollingPane.TwoScrollingMovies.scrolling_1._height+10;
}
}
Can I use something like this?
[code]var scale:Tween = new Tween(body.scrollingPane.TwoScrollingMovies.scrolling_1, "_y", Regular.easeOut, 200, 300, 1, true);
but I don't have the increment thing going on. Does anyone know how I would do this?
Thanks,