Jump to content
Search Community

Search the Community

Showing results for tags 'pause timelinemax'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • GreenSock Forums
    • GSAP
    • Banner Animation
    • Jobs & Freelance
  • Flash / ActionScript Archive
    • GSAP (Flash)
    • Loading (Flash)
    • TransformManager (Flash)

Product Groups

  • Club GreenSock
  • TransformManager
  • Supercharge

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Personal Website


Twitter


CodePen


Company Website


Location


Interests

Found 1 result

  1. I'm sure it's somewhere there, 'cause Greensock has everything, but I cannot seem to find the right way. What I want is to create a timeline containing several animation sequences. Those animation sequences I would like to start seperately and they are not allowed to continue to the next part. To accomplish this I put 'pause-markers' at the end of each animationpart and labels at the start of each new part. Another timeline then gotoAndPlays the right animationpart, wich stops at the 'pause-marker' when the part is finished. Example: var tl_eyes = new TimelineMax( { paused: true }); tl_eyes // ------- OPEN EYES -------- .addLabel('openEyes') .set(leftEye, { alpha : 1}, 'openEyes') .set(rightEye, { alpha : 1}, 'openEyes') .to(leftEye, 0.3, { scaleX: 1, scaleY: 1, ease:Back.easeInOut }) .to(rightEye, 0.3, { scaleX: 1, scaleY: 1, ease:Back.easeInOut }, '-=0.2') .addCallback(function() { tl_eyes.pause(); }) // ------- BLINK MIDDLE -------- .addLabel('blinkMiddle') .to(leftEye, 0.1, { scaleY: 0 }, 'blinkMiddle') .to(rightEye, 0.1, { scaleY: 0 }, 'blinkMiddle') .to(leftEye, 0.2, { scaleY: 1 }, 'blinkMiddleUp') .to(rightEye, 0.2, { scaleY: 1 }, 'blinkMiddleUp') .addCallback(function() { tl_eyes.pause(); }) // ------- LOOK LEFT -------- .addLabel('lookLeft') .to(leftEye, 0.1, { scaleY: 0 }, 'lookLeft') .to(rightEye, 0.1, { scaleY: 0 }, 'lookLeft') .to(leftEye, 0.3, { x: normLeft_X - eyeLookOffsetSmallX }, 'lookLeftMove') .to(rightEye, 0.3, { x: normRight_X - eyeLookOffsetLargeX }, 'lookLeftMove') .to(leftEye, 0.2, { scaleY: 1 }, 'lookLeftOpen-=0.2') .to(rightEye, 0.2, { scaleY: 1 }, 'lookLeftOpen-=0.2'); The current pause-markers I created using .addCallback wich calls a function that pauses the timeline. But I like a cleaner method of doing this, like .pause or something. For some reason I cannot find a method like that. Am I mistaken or overlooking something here? So my question is: What's the right way of put methods inside the timeline wich pauses the timeline? Is there something like pause? And also: Inside the 'pause-markers' I use addCallback wich triggers the pause-method of the timeline by variable. But it's not very clean. Is there a way like 'this' to accomplish the same, 'cause the callback is triggered from within itself? (I know this is a Javascript question, but maybe somebody can point me a direction here). Thanks!! And again: greensock rules!! I'm sure there is a better way for doing this already build in, 'cause Greensock surprises me everytime again
×
×
  • Create New...