Jump to content
Search Community

caglarkoylu

Members
  • Posts

    3
  • Joined

  • Last visited

caglarkoylu's Achievements

0

Reputation

  1. Carl, I appreciate your effort to help me figure this out. The application includes tens of thousands of tweens and very memory intensive but I don't have a better choice than my current design. It looks like the animations work fine without any synchronization or lagging problems. It was actually my guess about what was happening. You are right, it is really hard to tell and I think some of the timelines that are already finished do reverse but for some reason some graphics are never cleared. If you reverse soon after you start the animation everything is cleared. If you wait longer and reverse then there are more graphics left who are supposed to be clear when the reverse is complete. I am going to subset a part of the animation so that I can debug and figure out exactly what is happening. I think I should also tell you why I want to reverse. My actual goal is to be able to drag the slider that controls the timeline. This is the exact issue that I posted on your blog http://www.snorkl.tv/2011/04/tweenlite-meets-flash-drawing-api-for-animated-line-drawing-fun/ I think I found a way to solve this issue and here is my logic: when you click or drag the slider that controls the root timeline, if the new location of the thumb is forward, for example, while the current value is 40 you dragged it to 90, then the animation is played in a very high speed (timescale 100) until 90 and then it is played at normal speed; if the location of the thumb is backward, for example, you dragged the thumb to 10 then the animation is reversed really fast to 10 and it is played at normal speed. I am sure it is not the best way to do this but it looks like it works besides the graphics that are supposed to be cleared when reversed. (FYI:Thumb dragging is currently disabled so you won't be able to try it if you want to) Best, Caglar
  2. Carl, Unfortunately I can't post a fla because my application is web-based. Here is the link that I use for debugging my application http://129.252.37.169:8400/samples/flowmap-debug/index.html This application animates migration of over 4000 individuals from 9 families. There is a timeline for each individual and a parent timeline for each family. The graphics are drawn on the map by customized graphics layer and symbol classes that can embed all the timeline animations. When each timeline finishes the lines turn into blue. If you play the animation and reverse using the buttons in the widget, you will be able to observe the issue. Below are the methods that I use to draw line animations private function drawLineForReverse():void { // trace(tl.currentTime); lineSprite.graphics.clear(); nodeSprite.graphics.clear(); //start new lineSprite at first point; lineSprite.graphics.lineStyle(2,0xDD1C77,0.2); lineSprite.graphics.moveTo(animationStartPoint.x, animationStartPoint.y); //loop through and connect all the points for (var i:Number = 0; i< pointCount; i++) { var point:Point = pointsArray[i] as Point; nodeSprite.graphics.beginFill(0xFF9933,0.4); nodeSprite.graphics.drawCircle(point.x,point.y,5); nodeSprite.graphics.endFill(); lineSprite.graphics.lineTo(point.x, point.y); //don't draw the last segment when reversing if (tl.reversed) { if (i == pointCount - 1) { break; } } } //draw a line to where the mc is lineSprite.graphics.lineTo(mc.x, mc.y); nodeSprite.graphics.beginFill(0xDD1C77,1); nodeSprite.graphics.drawCircle(mc.x,mc.y,5); nodeSprite.graphics.endFill(); } private function drawCompletedGraphics():void{ // trace(tl.currentTime); lineSprite.graphics.clear(); nodeSprite.graphics.clear(); //start new lineSprite at first point; lineSprite.graphics.lineStyle(2,0x0033FF,0.1); lineSprite.graphics.moveTo(animationStartPoint.x, animationStartPoint.y); //loop through and connect all the points for (var i:Number = 1; i< pointsArray.length; i++) { var point:Point = pointsArray[i] as Point; nodeSprite.graphics.beginFill(0x0033FF,0.1); nodeSprite.graphics.drawCircle(point.x,point.y,4); nodeSprite.graphics.endFill(); lineSprite.graphics.lineTo(point.x, point.y); } } Meanwhile, I will try to replicate the issue with a simpler tween animation. Best, Caglar
  3. Hi, I have a root-timeline which controls many child timelines. Each child timeline has different start time and duration and they all have many tweens inside. These tweens are used to draw animated lines using Carl's example http://www.snorkl.tv/dev/tweenDraw/erase.html Line drawing animation erases the lines when you reverse. I have a button control to reverse the root-timeline animation. Here is the problem: when I reverse the root timeline at anytime, nested (child) timelines that are not completed yet are reversed and the expected line drawing (erasing) works fine. However, timelines that are already completed are not reversed and the lines that were drawn stays there. In other words timelines that are already completed are not reversed. I first felt like it should work the way it is but after reading greensock's comment on a similar problem in http://forums.greensock.com/viewtopic.php?f=1&t=4238&hilit=nested+timeline+nested+timeline+reverse+reverse+nested&start=10. greensock wrote: I started to think that I need to do something like trigger or play/reverse each nested timeline when the root timeline reaches the time they are completed. Can you guys give me a direction to solve this problem? Best, Caglar
×
×
  • Create New...