Jump to content
Search Community

Farzanmc

Members
  • Posts

    3
  • Joined

  • Last visited

Farzanmc's Achievements

1

Reputation

  1. I don't believe it. It works like a charm. I tested the 3 of them with sending parameters also. They all works just fine. It's so look like OOP and I'm so happy to use it. Makes me feel I'm still on AS 3.0 Thank you Jack. you saved me tons of codes. For any one else who may have the same problem , to complete this forum, I'll write the callbacks with Parameters. function function2() { cacTimeline.eventCallback("onReverseComplete", callback_function); cacTimeline.eventCallback("onReverseCompleteParams", [parameter_value]); cacTimeline.reverse(); } function2() { TweenLite.delayedCall(cacTimeline.time(), callback_function, [parameter_value]); cacTimeline.reverse(); } function2() { cacTimeline.tweenTo(0, {onComplete:callback_function,onCompleteParams:[parameter_value]}); cacTimeline.reverse(); } And also for any one who has the same problem as me, you should not write the callback function with " () " , you just write the name of the function and the separately the parameters. function callback_function(parameter) { // Do some stuff } // Right way to use the method. cacTimeline.tweenTo(0, {onComplete:callback_function,onCompleteParams:[parameter_value]}); // Wrong way to use the method. // Fires the function immediately at the runtime cacTimeline.tweenTo(0, {onComplete:callback_function(),onCompleteParams:[parameter_value]});
  2. Hi. I declare var cacTimeline; as global variable. I then use it like this in function1 for example : function1 () { cacTimeline = new TimelineMax(); cacTimeline.to($linePath,0.5,{height:300}); ...... } I then want to reverse it in function2 and have a onReverseComplete or some callback at the end. But for the sake of my app , I have to append this callback in function2 , not in the object declaration. function2 () { cacTimeline.addCallback(callback_function_name,0); cacTimeline.reverse(); } Fires the callback_function_name twice. One at the start of the tween , one at the end of the sequence. function2 () { cacTimeline.addCallback(callback_function_name,cacTimeline.totalDuration()); cacTimeline.reverse(); } callback_function_name never fires. Can anyone help me. I'm new to this , maybe there is a better solution for this.
  3. Hi guys, i have a problem with easing on drag and rotation the circle, would you pleaaaaaaaaaaaaaaaseeeeeeeeee read this thread i wrote on kirupa ? http://www.kirupa.com/forum/showthread.php?t=355939 Thank you soooooooooooooooooooooooooooo much for any help.
×
×
  • Create New...