<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Can I make a couple more little code suggestions?</div><div><br></div><div>First, break out the _init routine into a private init() method. </div><div>Cleaner to read, easier to repurpose, better OO practice – all of which go a long way with shared code.</div><div>I know, I'm one to talk after Fuse's code ;-) but we're in AS3 land now so – best practice always!</div><div><br></div><div>Secondly, in adding sequencing I think your interface has gotten muddy. I get the AUTOSTART idea but don't like it, because if users wanted the extra convenience of a generate-then-start method like go() used to be, they definitely *don't* want the *in*convenience of having to set some special parameter first just to make that work.</div><div><br></div><div>Instead, just offer 4 ways to do the 4 different things:</div><div> 1) Constructor makes a tween, leave it at that, you don't need a secondary method that does the same thing.</div><div> 2) A method that auto-runs a tween, and reads like a verb, like go()</div><div> 3) A noun method that generates a sequence like makeSequence(), generateSequence(), buildSequence(), makeChain(), etc.</div><div> 4) A verb method that plays a sequence like sequence() or runSequence()</div><div><br></div><div><div>For example,</div><div> new HydroTween()</div><div> HydroTween.go():IPlayable</div><div> HydroTween.parseChain():SequenceCA</div><div> HydroTween.chain():SequenceCA</div></div><div><br></div><div>See what I mean? That only changes 2 things about the way you did it: it makes go() back into an auto-start method, and changes sequence() into two methods, one a "noun" and the other a "verb." More intuitive and would let you ditch AUTOSTART. (If you are bent on a 2-method interface I would just change go() to also detect and auto-start a sequence as well as a tween or tween group, and then have a makeSequence-type noun method as the second one.) </div><div><br></div><div>Hey, that's just my 2 cents take it or leave it – Over all this is a very fine release my friend! Congrats</div><div><br></div><div> :-)</div><div><br></div><div>- Moses</div><div><br></div><br><div><div>On May 14, 2008, at 10:40 AM, Donovan Adams wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Thanks man! Great Idea. I'll add that in there for the next update<br></blockquote>-</div><blockquote type="cite"><div><blockquote type="cite">Fantastic stuff!<div><br></div><div>Suggestion based on your color reset of -1: you might add a static const for that, like HydroTween.RESET:int = -1, which would make the code easier for people to read within the action objects.</div><div><br></div><div>Great job D!</div><div><br></div><div>- m</div><div><br><div><div>On May 13, 2008, at 10:54 PM, <a href="mailto:donovan@hydrotik.com">donovan@hydrotik.com</a> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <font face="Verdana, Helvetica, Arial"><span style="font-size: 12px;">Hey folks. I made a formal post on the latest HydroTween updates with some usage, etc. I also updated the wiki. Trying to get a direct download on the goplayground site, in the meantime you can get the source and example at the bottom of the blog post.<br> <br> <a href="http://blog.hydrotik.com/2008/05/13/go-048jg1-hydrotween-rev30-guide-source-code/">http://blog.hydrotik.com/2008/05/13/go-048jg1-hydrotween-rev30-guide-source-code/</a><br> <br> Here are some snippets:<br> </span><font size="4"><span style="font-size: 13px;"><br> // General/ColorMatrix Tweening!<br> HydroTween.go(mc, {x:200, color:0xFF0000}, 2, 0, Elastic.easeOut, onCompleteHandler);<br> <br> // Fuse style sequencing!<br> var seq1:SequenceCA = HydroTween.sequence(<br> {target:fusebox, x:320, seconds:5, easing:Quadratic.easeInOut},<br> {target:fusebox, Blur_blurX:8, Blur_blurY:8, seconds:5, easing:Quadratic.easeInOut},<br> {target:fusebox, color:0x0000FF, seconds:5, easing:Quadratic.easeInOut},<br> {target:fusebox, Blur_blurX:0, Blur_blurY:0, seconds:5, easing:Quadratic.easeInOut},<br> {target:fusebox, x:400, seconds:.5, easing:Quadratic.easeInOut},<br> {target:fusebox, rotation:270, seconds:.5, easing:Quadratic.easeInOut}<br> );<br> seq1.start();<br> <br> Also I will be at Flashbelt. Maybe we can all Go grab a bit to eat one night! :) sorry I couldn't help myself.</span></font></font> </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><br> _______________________________________________<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></blockquote></body></html>