Hi guys! I am new to Greensock and I am so amazed about the power it has. I started to learn how to use it and during one of an example project I found a problem in which I can't go on.
The problem:
I have a panoramic photo, that is bigger than the screen and I want to use TweenMax to move over it and show also the hidden part, till now is everything ok, the problems come if I want to move to the same direction more than one time. For example when I want to discover the right part of the image and I push on my arrow button to move right the first time I push it works, but the second time I push it doesn't move again. Surely is a much more simple problem than how I think but I would really want to know if is normal that doesn't work more than once.
Here there is the code of the Tweens:
$('#frecciaDx').on('click', function () {
TweenMax.fromTo("#stanza", 0.8, {css:{marginLeft:0}}, {css:{marginLeft:-200}});
});
$('#frecciaSx').on('click', function () {
TweenMax.fromTo("#stanza", 0.8, {css:{marginLeft:0}}, {css:{marginLeft:200}});
});
$('#frecciaSu').on('click', function () {
TweenMax.to("#stanza", 0.8, { y: 600 });
});
$('#frecciaGiu').on('click', function () {
TweenMax.to("#stanza", 0.8, { y: -600 });
});
Thank you really much guys!