<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">K –<div><div>The reason that skipTo() was picked over a more complicated interface is that only tweens which have start and end can be rewound or fast-forwarded – not the case for physics animations necessarily. But skipTo() can easily be used to rewind and ff:</div><div><br></div><div>Rewind:<span class="Apple-tab-span" style="white-space:pre">        </span>skipTo(0);</div><div>FF: <span class="Apple-tab-span" style="white-space:pre">                </span>skipTo(tween.duration);</div><div><br></div><div>Now, to the heart of your question which is skipTo + parallel or sequence.</div><div><br></div><div>Here is how I think we could implement that functionality:</div><div>1. PlayableBase should have a read-only duration getter that returns the max time of all children</div><div>2. SequenceBase might also need a duration getter that sums all step durations.</div><div>3. SequenceBase should get skipToTime() functionality. Alternatively skipTo could use time and the secondary method could be skipToIndex().&nbsp;</div><div><br></div><div>The time-based one is easy to implement; you just run a sum of durations on each step and when the sum exceeds the time you back it up one and run skipTo() on the step with the remainder.</div><div><br></div><div>To implement a slider you could calculate a percentage against the Sequence's total duration.</div><div><br></div><div>Does this address your questions? I'm happy to help you add these features to the utils or, give it a shot and post your version!</div><div><br></div><div>- moses</div><div><br></div><div>PS:&nbsp;Go is naturally time-based. Do not use the useFrames option, there is nothing simpler or more intuitive about it. It is a specialty option that should be saved for special cases where you have to process things in frames.&nbsp;</div><div><br></div><div>PPS: Also be sure to&nbsp;take a look at the GoTestBase class included (there's also a GoFlexTestBase). It sets up buttons that let you perform all the play controls on a tween (see the included examples in the com.mosesSupposes.go.tests package). When you run the line super.addButtonUI(), the second param defines the skipTo() amount for that test, and will appear on the button.</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br><div><html>On Apr 21, 2008, at 5:12 AM, Karsten Goetz wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "> <div>Hi Coders,</div><div><br></div><div>I like the idea to seperate into different tweens.&nbsp;</div><div>I tried to do something like this a few weeks ago - but the work is not finished and has some bugs.&nbsp;</div><div>I've submited them anyway to SVN in my package ( KarstenGoetz ). If you are interessted, have a look.</div><div><br></div><div>I tried to set up some "interactive test", too ( not post to svn ).&nbsp;</div><div>What I mean is some more &nbsp;complex animation that starts on mouseover, rewinds on mouseout and perhaps do</div><div>some new animation on click from the given position... in other words, i played around.&nbsp;</div><div>I don't have results from this session but some questions:</div><div>- how would you arrange such an animation?</div><div>- I sometimes miss a more timebased handling of tweening. We can play forward and skipTo - but what about rewind a tween and rewindTo?</div><div>Imagine a slider, representing the animation time, you drag it and a tween, group or sequence would calculate the animation at this time.&nbsp;</div><div><br></div><div>I get a bit confused about this things, so I want to ask you. For me LinearGo and PlayableGroup ( and Sequence ) are leaving the "lightweight"-zone ( I'm pointing here to the implementations of Repeater and useFrames - all absolutly nessesary, but I start to miss the basic thing... ).</div><div>I think a basic Tween ( LinearGo, or maybe a new Class called TimeGo?;- ) should be more timeline-like. In my point of view it's not far away and I started to create some experients on that to try if its possible. I think it is &nbsp;- but is it a way? Maybe I'm &nbsp;totally wrong? Maybe I've missed some tools in Go that doing this stuff.&nbsp;</div><div><br></div><div>Lots of greetings</div><div><br></div><div>Karsten</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><br><div>Am 17.04.2008 um 18:56 schrieb Moses Gunesch:<br class="Apple-interchange-newline"><blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">On Apr 17, 2008, at 10:41 AM, Tollman Owens wrote:</div> <blockquote type="cite"><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">I can only see the benefit of doing all of the extra functionality in</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">external classes for legibility, because you are going to</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">get the weight when you do the import, so being able to save file size</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">is not really an issue, please correct me is i am wrong.</div> </blockquote><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">It's not about legibility, it's about modularity.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Think about it from an Object-Oriented and Open-Source Sharing <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">perspective: Whoever extends LinearGo with the best (simplest, most <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">coherent, most functional) set of basic tween classes will be <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">providing a bedrock foundation for everyone else.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">The most attractive set of basic tween classes put out by one of you <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">should end up receiving a VERY high adoption rate, because this set of <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">basic tween classes can be repurposed for ANY parser or more complex <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">system. No one has so far realized this and picked up the gauntlet <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">but, I'm freely handing it to all of you for the taking. So go ahead, <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">get famous if you want. ;-)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Such a set is not included in GoASAP in order to maintain purity:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Go is a base system that doesn't propose any specific syntax, not even <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">for tween classes, because there are so many approaches to that <span class="Apple-converted-space">&nbsp;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">interface.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">A basic list of tweens might be something like this:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A DisplayObject tween</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A generic any-object/ any-property multiple-value tween</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A generic any-object/ any-property multiple-value tween</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A ColorTransform tween (could subclass the multi-value tween)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A BitmapFilter tween</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-tab-span" style="white-space:pre">        </span>(could be several of them since some filters are multi-value)</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space">&nbsp; </span>* A Bezier-arc tween</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">Just my two cents.</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">moses</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; min-height: 14px; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">GoList mailing list</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="mailto:GoList@goasap.org">GoList@goasap.org</a></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><a href="http://goasap.org/mailman/listinfo/golist_goasap.org">http://goasap.org/mailman/listinfo/golist_goasap.org</a></div> </blockquote></div><br><div> <span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><span class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><div>------------------------</div><div>Karsten Goetz</div><div>Flashprogrammierung</div><div><br class="khtml-block-placeholder"></div><div>Bernstorffstr. 120</div><div>22767 Hamburg</div><div><br class="khtml-block-placeholder"></div><div>Tel: &nbsp; &nbsp;&nbsp; &nbsp;+49 40 43 09 91 07</div><div>Mobil:&nbsp; &nbsp;0173 57 14 984</div><div><br class="khtml-block-placeholder"></div><br class="Apple-interchange-newline"></span></span> </div><br></div>_______________________________________________<br>GoList mailing list<br><a href="mailto:GoList@goasap.org">GoList@goasap.org</a><br><a href="http://goasap.org/mailman/listinfo/golist_goasap.org">http://goasap.org/mailman/listinfo/golist_goasap.org</a><br></blockquote></div><br></div></div></body></html>