tl.to($obj, speed, {
y: '40'
});
tl.addLabel('label');
tl.addCallback(function() {
playSound();
}, 'label+=.15');
tl.addCallback(function() {
playSound();
}, 'label+=.25');
For me, the timeline WAIT the execution of call()/addCallback().
Can someone explain me why the timeline is paused (or not rendered) when I use add() and addCallback()?
The best would be to have a running timeline (not disturbed by callbacks).
Using a timeline is give the possibility to insert small function at the right place without doing the non maintainable way with setTimeout({}, 200)..
Attempt: Wrap the callback function in a setTimeout(playSound, 0). Not working
Pen: http://codepen.io/magister/pen/GgrRae