function tweenFunction(options){
TweenLite.to(element, timer, {left: left, top: top, ease:"Linear.easeNone", delay: delay,
onComplete: function(){
animateLeft = options.animateLeft || false;
callLeft = options.callLeft || false;
if(animateLeft) {options.callLeft()}
},
});
}
function leftGroup() {
var timer = 2.5;
var adjustedTime = 1.25;
tweenFunction({element: assetA, leftVal: "38px", topVal: "121px", timer: timer, animateLeft: true, callLeft: LeftAssets});
function LeftAssets() {
tweenFunction({element: hydrogenB, leftVal: "116px", topVal: "39px", timer: timer}); //timer: adjustedTime
tweenFunction({element: hydrogenA, leftVal: "116px", topVal: "39px", timer: adjustedTime });
}
I simplified what I am doing to make it simpler to post here (I might of missed something on the syntax, but my code runs just fine).
Basically I have a function that takes in objects that moves stuff aroud (I call these assets). In the LeftAssets function assetB and assetC must run off different timers (timer, adjustedTime). My problem is that when I set the different timers the tween that uses adjustedTime runs a couple of times and then settles in the tween position; the other one continues tweening normally. Not sure what is even causing this problem.
Hope I made sense..
thanks all