Jump to content

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

howto properly gotoAndPlay huge TimelineMax

Recommended Posts

Hi guys,


context: im creating an infographic where tv-ratings are being visualized.


I have a huge TimelineMax where 1000 dots (mc's) are constantly being tweened. This timeline is attached to a standard Slider from the Flash Components.


Now, if i let the timeline play, no errors occur.

When i skip ahead or back in time, some dots (that were in the middle of tweening) just stop playing and just stand there half-way....


please check it out herrre:




this is what happens when you skip/drag the slider:

case UIEvent.THUMB_DRAG:
mainTimeline.goto(event.value, false);

mainTimeline.gotoAndStop(event.value, false);

mainTimeline.gotoAndPlay(event.value, false);

if (!bottomSliderGUI.playMode)
mainTimeline.gotoAndStop(event.value, false);
mainTimeline.gotoAndPlay(event.value, false);


mainTimeline is a TimelineMax, and for each dot/mc (viewer), this is being used:

mainTimeline.insert(new TweenLite(viewer, 1, {x:target.x, y:target.y}),labelTime);


who can help me?

what seems to be the officer, problem?????

Link to comment
Share on other sites

A few questions:


1) What version of TweenLite/TimelineMax are you using?


2) When you drag the scrubber, are you inserting any new tweens? It's almost acting like some overwriting is happening.


3) Can you post a sample FLA that demonstrates the issue? You don't need to post your production files - just something simple that we can publish to see the issue.

Link to comment
Share on other sites

i downloaded/used the latest one - still happens..


all tweens are inserted in a new paused timeline, before timeline.play()


I use FDT, Flash only to build assets.swc....thats why it its quite hard to create a fla


edit: took quite some time to create this fla, but eventually it works ;)


download it here


as you will see, it happens during dragging, but also when clicking.....


thanks for your time!


So, what is going wrong in here?


i now try to create someting using nested timelines

Edited by dominggus
Link to comment
Share on other sites

Yes, you were definitely creating a bunch of overlapping (conflicting) tweens. For example, you create an x/y tween for a particular object that lasts 1 second and then you insert ANOTHER x/y tween of the SAME object that starts 0.1666 seconds into that first tween, so it overwrites those values and kills the x/y portions of the first tween. See what I mean?


Ideally, you'd clean things up so that there aren't any overlaps, but if you prefer, you could just set overwrite:false on your tweens. The down side to doing that is you've still got conflicting tweens that are battling to control the same properties of the same objects at the same time.


Does that clear things up?

Link to comment
Share on other sites

i understand what u said, though i don't get why it only happens when 'jumping' the timeline, and not when you just let it play out....

Link to comment
Share on other sites

Overwriting occurs when a tween renders for the first time. So when your timeline is playing forward, it makes perfect sense that nothing would get stuck because things are overwritten in that order, but if you scrub BACK, that's when you'd notice things.


For example, let's say you've got a 10-second tween that makes mc.x go from 0 to 100 and then after 5 seconds, another tween begins that takes mc.x to 200 (and let's assume the ease is Linear to make things easy). When the 2nd tween begins, mc.x would be at 50, so it would lock in the start/end values of 50/200 and it would KILL the "x" portion of the previous tween. Let's say both tweens are in a TimelineLite. At the end of that TimelineLite, let's say you scrub the time BACK to 0 - where do you think mc.x will be? 50. It would rewind that 2nd tween to its beginning (remember, that's 50), and the first tween would also be rewound, but since the "x" portion of that tween was overwritten, it won't change mc.x at all (that part of the tween is dead).


This explains why mc.x might look "frozen" at 50 instead of going back to 0. The engine is doing exactly what it is supposed to do.


Make more sense now?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.