Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...

bernex

Members
  • Posts

    5
  • Joined

  • Last visited

bernex's Achievements

0

Reputation

  1. Sure... pause is a good solusion, but don't work then I use tweenTo(copy)... Both boxes animated. http://codepen.io/dkdf/pen/qDkob var tl = new TimelineMax({paused: true}); tl.to("#redBox", 1, {left:500}); tl.addLabel("preload_and_change"); tl.add(function() { tl.pause(); }); tl.to("#blueBox", 1, {left:500}); tl.addLabel("step2"); tl.tweenTo('step2');
  2. That to do if I'm using tweenTo("hover")? Pauso not working (
  3. I have updated code... var tl = new TimelineMax({paused: true}); tl.to("#redBox", 1, {left:500}); tl.addLabel("preload_and_change"); tl.add(function() { //http://api.jquery.com/promise/ //http://api.jquery.com/category/deferred-object/ var q = $.Deferred(); var img = document.createElement("img"); img.onload = function() { //UPDATE IMAGE THEN LOADED AND THEN RESUME ANIMATION q.resolve(): } img.src = 'http://www.greensock.com/wp-content/themes/greensock/images/logo.png'; return q.promise(); }); tl.to("#blueBox", 1, {left:500}); tl.play();
  4. http://codepen.io/dkdf/pen/KjdCg
  5. I wanna preload image and replace. This code do not working: http://codepen.io/dkdf/pen/KjdCg var tl = me.tl = new TimelineMax({paused: true}); tl.addLabel("preload_and_change"); tl.add(function() { var q = $.Deferred(); console.log("prepare") return q.promise(); }); Can I do it? How? Thanks.
×