[Golist] HydroTween Updates/Post
Donovan Adams
donovan at hydrotik.com
Wed May 14 09:16:07 PDT 2008
I think the reasoning for doing that actually came down to having some difficulty with building the sequence. I had to use the static go() call instead of instantiating a HydroTween instance when building the sequence in the parseAction() method otherwise it wouldn't work. When I used the static version it worked, but it automatically starts.
----------------------------------------
Return-Path: <golist-bounces at goasap.org>
Received: from procyon.lunarpages.com [209.200.229.10] by mail29.safesecureweb.com with SMTP;
Wed, 14 May 2008 11:48:45 -0400
Received: from localhost ([127.0.0.1] helo=procyon.lunarpages.com)
by procyon.lunarpages.com with esmtp (Exim 4.68)
(envelope-from <golist-bounces at goasap.org>)
id 1JwJC1-0007kZ-Pm; Wed, 14 May 2008 08:47:01 -0700
Received: from cpe-72-227-133-165.nyc.res.rr.com ([72.227.133.165]
helo=[192.168.1.100])
by procyon.lunarpages.com with esmtpsa (TLSv1:AES128-SHA:128)
(Exim 4.68) (envelope-from <moses at goasap.org>) id 1JwJBw-0007j6-11
for golist at goasap.org; Wed, 14 May 2008 08:46:56 -0700
Message-Id: <811DBB8D-1EA9-4975-90EF-5E767AF8EC34 at goasap.org>
From: Moses Gunesch <moses at goasap.org>
To: Mailing list for the Go ActionScript Animation Platform <golist at goasap.org>
In-Reply-To: <77d34173877b4000943bcd9080fde0b6 at mail29.safesecureweb.com>
Mime-Version: 1.0 (Apple Message framework v919.2)
Date: Wed, 14 May 2008 11:46:50 -0400
References: <77d34173877b4000943bcd9080fde0b6 at mail29.safesecureweb.com>
X-Mailer: Apple Mail (2.919.2)
Subject: Re: [Golist] HydroTween Updates/Post
X-BeenThere: golist at goasap.org
X-Mailman-Version: 2.1.9.cp2
Precedence: list
Reply-To: Mailing list for the Go ActionScript Animation Platform
<golist at goasap.org>
List-Id: Mailing list for the Go ActionScript Animation Platform
<golist_goasap.org.goasap.org>
List-Unsubscribe: <http://goasap.org/mailman/listinfo/golist_goasap.org>,
<mailto:golist-request at goasap.org?subject=unsubscribe>
List-Archive: <http://goasap.org/pipermail/golist_goasap.org>
List-Post: <mailto:golist at goasap.org>
List-Help: <mailto:golist-request at goasap.org?subject=help>
List-Subscribe: <http://goasap.org/mailman/listinfo/golist_goasap.org>,
<mailto:golist-request at goasap.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0497674942=="
Sender: golist-bounces at goasap.org
Errors-To: golist-bounces at goasap.org
X-AntiAbuse: This header was added to track abuse, please include it with any abuse report
X-AntiAbuse: Primary Hostname - procyon.lunarpages.com
X-AntiAbuse: Original Domain - hydrotik.com
X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-AntiAbuse: Sender Address Domain - goasap.org
X-Source:
X-Source-Args:
X-Source-Dir:
X-Rcpt-To: <donovan at hydrotik.com>
X-SmarterMail-Spam: Bayesian Filtering, SPF_None
Can I make a couple more little code suggestions?
First, break out the _init routine into a private init() method. Cleaner to read, easier to repurpose, better OO practice - all of which go a long way with shared code.I know, I'm one to talk after Fuse's code ;-) but we're in AS3 land now so - best practice always!
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.
Instead, just offer 4 ways to do the 4 different things: 1) Constructor makes a tween, leave it at that, you don't need a secondary method that does the same thing. 2) A method that auto-runs a tween, and reads like a verb, like go() 3) A noun method that generates a sequence like makeSequence(), generateSequence(), buildSequence(), makeChain(), etc. 4) A verb method that plays a sequence like sequence() or runSequence()
For example, new HydroTween() HydroTween.go():IPlayable HydroTween.parseChain():SequenceCA HydroTween.chain():SequenceCA
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.)
Hey, that's just my 2 cents take it or leave it - Over all this is a very fine release my friend! Congrats
:-)
- Moses
On May 14, 2008, at 10:40 AM, Donovan Adams wrote:Thanks man! Great Idea. I'll add that in there for the next update
-Fantastic stuff!
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.
Great job D!
- m
On May 13, 2008, at 10:54 PM, donovan at hydrotik.com wrote: 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.
http://blog.hydrotik.com/2008/05/13/go-048jg1-hydrotween-rev30-guide-source-code/
Here are some snippets:
// General/ColorMatrix Tweening!
HydroTween.go(mc, {x:200, color:0xFF0000}, 2, 0, Elastic.easeOut, onCompleteHandler);
// Fuse style sequencing!
var seq1:SequenceCA = HydroTween.sequence(
{target:fusebox, x:320, seconds:5, easing:Quadratic.easeInOut},
{target:fusebox, Blur_blurX:8, Blur_blurY:8, seconds:5, easing:Quadratic.easeInOut},
{target:fusebox, color:0x0000FF, seconds:5, easing:Quadratic.easeInOut},
{target:fusebox, Blur_blurX:0, Blur_blurY:0, seconds:5, easing:Quadratic.easeInOut},
{target:fusebox, x:400, seconds:.5, easing:Quadratic.easeInOut},
{target:fusebox, rotation:270, seconds:.5, easing:Quadratic.easeInOut}
);
seq1.start();
Also I will be at Flashbelt. Maybe we can all Go grab a bit to eat one night! :) sorry I couldn't help myself. _______________________________________________
GoList mailing list
GoList at goasap.org
http://goasap.org/mailman/listinfo/golist_goasap.org
_______________________________________________
GoList mailing list
GoList at goasap.org
http://goasap.org/mailman/listinfo/golist_goasap.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080514/8dbc36e0/attachment-0001.html
More information about the GoList
mailing list