Jump to content
Search Community

annam

Members
  • Posts

    51
  • Joined

  • Last visited

Everything posted by annam

  1. hi, i have a simple fadein-fadeout animation, which is triggered on mouseover-mouseout. here's the sample code: onmouseover = function(){ TweenMax.to('#id', 1, { autoAlpha: 0.5, onComplete: function(){ // some background stuff handled here } }); } onmouseout = function(){ TweenMax.to('#id', 1, { autoAlpha: 1, onComplete: function(){ // some background stuff handled here } }); } this works great, and the onComplete function triggers as expected, unless the onmouseout function is triggered because the onmouseover transition has enough time to complete. when this happens, the oncomplete function for the mouseover event, does not trigger. I guess because it never completes however i really need the stuff going on in that function to run! is there something similar to a onStop() or onInterrupted event where I can also trigger these? I dont want to use onReverse() - the onmouseout animation may be animating to a different opacity so that wont work. Triggering the oncomplete stuff on mouseout wont work either.. so the question is, is there a way (callback?) to detect whether the animation has been interrupted before completion? thanks
×
×
  • Create New...