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

# eigenface

Members

72

0

1. ## how to use a timeline as a tween group

Thanks for the help.
2. ## obtaining an overall time / constant speed thru a series of bezier tweens with variable path lengths?

Thanks. For anyone who is reading this thread after searching for the same topic, like I did, I found a good quadratic bezier length algorithm here: https://code.google.com/p/bezier/source/browse/trunk/bezier/src/flash/geom/Bezier.as I found other implementations didn't handle edge cases well - sometimes they returned NaN.
3. ## obtaining an overall time / constant speed thru a series of bezier tweens with variable path lengths?

I'm in a similar situation to da2020, in that I need to be able to specify the speed of an object on a bezier tween. In order to get the duration, I need the distance along the bezier curve. I could use a similar solution, that is, convert "thru" points to quadratic control points using BezierPlugin.bezierThrough, use a custom algorithm to calculate the bezier curve length from the control points, and then use a type:"quadratic" bezier tween with those same control points. However, I notice BezierPlugin has a _length property which appears to be the total bezier curve length, or at least the approximate length that BezierPlugin uses. Is it better to use the value of this _length property when calculating duration from speed (because this is the length of the path an object on the tween will actually follow)? Would it be possible to expose this _length to the public API in some way? It would be handy, and it seems a shame not to expose it, if it's already being calculated anyway.
4. ## how to use a timeline as a tween group

Thanks so much for this detailed explanation. My previous example works correctly if I add smoothChildTiming:true to the parentTimeline as you've indicated. To be honest, I didn't fully understand the explanation. I have a few questions, to make sure I'm setting things up correctly in my project. In my project, I want to put user-generated tweens in several different bottom-level timelines so I can pause/kill them by category (carsTimeline, trainsTimeline...), as well as add the timelines as children of a common parent timeline so I can pause/kill everything easily. Also, I want the bottom-level timelines to have autoRemoveChildren:true, so I won't accumulate completed tweens (which are never used again.) 1. Do I need to add smoothChildTiming:true to every ancestor timeline, except the bottom-level timeline which contains the tweens, like so? carsTimeline = new TimelineMax({ autoRemoveChildren:true }); parentTimeline = new TimelineMax({ smoothChildTiming:true }); grandParentTimeline = new TimelineMax({ smoothChildTiming:true, paused:true }); ... carsTimeline.add(TweenMax.delayedCall(carDelay, spawnCar), carsTimeline.time()); ... parentTimeline.add(carsTimeline); grandParentTimeline.add(parentTimeline); ... grandParentTimeline.play() As you can see, I also have paused:true in the top-level timeline, so I can add some initial tweens (in fact, delayed calls) and start them later. 2. I don't need to use totalTime(), right? (time() honors delays, just not repeatDelays)

6. ## how to use a timeline as a tween group

Thanks a lot, Jack and Carl! Everything works as expected now.

8. ## how to use a timeline as a tween group

Thanks, Carl! Your mouseDownHandler almost works correctly. The first click jumps to somewhere in the middle of an alpha fade already in progress, depending on how long you wait before clicking the first time. Subsequent clicks have the desired effect. I have been using the latest version of GSAP (12.1.2) - are you seeing this first-click problem also? In addition, I just want to get confirmation that I'm not crazy - my original mouseDownHandler looks like it should work, right? (It exhibits the same weirdness it always did if I switch totalTime to time.) My mouseDownHandler looks like a different way of writing your mouseDownHandler, but the visible behavior should be the same. The fact they exhibit different behavior seems buggy. Or am I missing some subtlety of the API?

10. ## best way to simulate animation in non-realtime?

Thanks for the great example! This seems to work well. I notice you don't pass the 'paused:true' parameter to the tween or the timeline. This doesn't seem to make a difference one way or the other to the loop (the actual animation does not run if paused, of course.) Are there any subtle reasons why passing 'paused:true' is not a good idea?