<HTML>
<HEAD>
<TITLE>Re: [Golist] HydroTween direct method calls--not callbacks? + HydroSequence</TITLE>
</HEAD>
<BODY>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Thx Jud,<BR>
<BR>
The default LinearGo will take one second to run (defaultDuration), so now I’m doing this:<BR>
<BR>
var l : LinearGo = new LinearGo(0, 0);
l.addCallback(mAnimator.showBirdsEyeView);
mSequence.addStep(l);
<BR>
And it does what I want it to do. The animation package I used to use (ActionQueue from ASAPLibrary) has the ability to just do something similar to:<BR>
<BR>
mSequence.addStep(mAnimator.showBirdsEyeView);<BR>
<BR>
It’s cleaner, but would require more coding in the SequenceCA. I’ll stick to the working code for now, and then maybe after the current project I’ll try to create a Go-package with the syntax I’m used to.<BR>
<BR>
Cheers,<BR>
EP.<BR>
<BR>
On 7/2/08 19:12 , "Jud Holliday" <<a href="judh@ZAAZ.com">judh@ZAAZ.com</a>> wrote:<BR>
<BR>
</SPAN></FONT><BLOCKQUOTE><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><FONT COLOR="#1F497D">Moses may be able to correct me, but I don’t think there’s a way to call a function directly from a sequence without setting up a tween of some sort with a callback.<BR>
<BR>
This is untested, but something like:<BR>
<BR>
</FONT></SPAN><FONT COLOR="#1F497D"><SPAN STYLE='font-size:12pt'>var seq:SequenceCA = new SequenceCA();<BR>
var tween:LinearGo = new LinearGo();<BR>
tween.addCallback(myFunctionName, GoEvent.START);<BR>
<BR>
seq.addStep(tweeen);<BR>
seq.start();<BR>
<BR>
Maybe there is an easier way?<BR>
</SPAN><SPAN STYLE='font-size:11pt'> <BR>
If you want to try using some classes outside of the core Go source, one of the classes in the ZAAZ Go Library was created for the purpose of making function calls. It’s one I’ve mentioned in previous threads called CallbackTrigger. It would look something like this:<BR>
<BR>
var seq:SequenceCA = new SequenceCA();<BR>
seq.addStep( new CallbackTrigger(myFunctionName) );<BR>
seq.start();<BR>
<BR>
Of course in both examples you would have other steps in your sequence as well. <BR>
<BR>
If you’re interested in checking it out, it is available out on the Go Playground (as a zip or through SVN). Better examples are included.<BR>
<BR>
<a href="http://code.google.com/p/goplayground/">http://code.google.com/p/goplayground/</a><BR>
<BR>
</SPAN></FONT><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT COLOR="#1F497D"><FONT SIZE="1"><FONT FACE="Verdana, Helvetica, Arial"><SPAN STYLE='font-size:7pt'> <BR>
-Jud<BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'> <BR>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Tahoma, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'><B>From:</B> <a href="golist-bounces@goasap.org">golist-bounces@goasap.org</a> [<a href="mailto:golist-bounces@goasap.org">mailto:golist-bounces@goasap.org</a>] <B>On Behalf Of </B>Eric-Paul Lecluse<BR>
<B>Sent:</B> Monday, June 30, 2008 3:29 AM<BR>
<B>To:</B> Mailing list for the Go ActionScript Animation Platform<BR>
<B>Subject:</B> Re: [Golist] HydroTween direct method calls--not callbacks? + HydroSequence<BR>
</SPAN></FONT></FONT><FONT FACE="Times New Roman"><SPAN STYLE='font-size:12pt'> <BR>
</SPAN></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'>Hey list, I’m currently using GO’s SequenceCA (via an example by John Grden). In the sequence I’d like to insert a single direct functioncall, as you are doing with the fuse-named sequence below. Is that possible with a SequenceCA? <BR>
<BR>
Obviously I’m very new to Go, for I can’t even find the HydroTween class in the Go SVN repos.<BR>
<BR>
Who’ll give me a slap in the face and a kick in the right direction?<BR>
Cheers,<BR>
Eric-Paul.<BR>
<BR>
On 6/27/08 17:52 , "Donovan Adams" <<a href="donovan@hydrotik.com">donovan@hydrotik.com</a>> wrote:<BR>
As a matter of fact there is. I've been in the process of testing an update to HydroTween as well as a breakout for Fuse style sequencing which more easily extends the power of SequenceCA. My continuing plan with HydroTween is to keep everything self contained, however this really made more sense in order to take advantage of Go's flexibility. SO with that said, I've added another companion class called HydroSequence. Works like this:<BR>
<BR>
import com.hydrotik.go.HydroSequence;<BR>
<BR>
var fuse:HydroSequence = new HydroSequence();<BR>
<BR>
<BR>
for (i = 0; i < _headArray.length - 1; i++) {<BR>
//HydroTween.go(_headArray[i].container, {alpha:1}, .25, i/4, Quadratic.easeOut);<BR>
fuse.addItem({target:_headArray[i].container, alpha:1, duration:.15, easing:Quadratic.easeOut});<BR>
}<BR>
<BR>
<BR>
fuse.addItem({target:_logo, alpha:1, duration:1, easing:Quadratic.easeOut});<BR>
fuse.addItem({target:_headArray[_headArray.length - 1].container, delay:1, alpha:1, duration:.1, easing:Quadratic.easeOut});<BR>
fuse.addItem({func: triggerAudio});<BR>
fuse.addItem({func: _scope.addEventListener, args:[Event.ENTER_FRAME, renderHeads]});<BR>
fuse.addItem({func: drawNav});<BR>
<BR>
fuse.start();<BR>
<BR>
HydroSequence internally generates instances of HydroTween to a sequence. All of the functionality of SequenceCA is accessble through HydroSequence now.<BR>
<BR>
If you are interested in testing out/playing with the new version of HydroTween and HydroSequence, contact me offlist and I'll send you the latest. So far it's working great, but wanted to make sure it gets a decent testing before formally posting the updates. Otherwise I should be releasing this soon.<BR>
<BR>
<BR>
Moses, forgive me for naming all my sequences "fuse". :) Habit I picked up from using Fuse AS2 and I copied and pasted this from the new scaretactics site.<BR>
<BR>
<a href="http://www.scifi.com/scaretactics/">http://www.scifi.com/scaretactics/</a><BR>
<BR>
<BR>
*******<BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Arial"><SPAN STYLE='font-size:10pt'>Are there any plans to allow HydroTween's sequencing to allow for direct method calls instead of callbacks? Something like:<BR>
<BR>
var seq1:SequenceCA = HydroTween.sequence(<BR>
,{target:my_mc, x:0, y:0, alpha:1, duration:3, easing:Sine.easeInOut}<BR>
,{scope:this, func:"myFunction", args["hi"]}<BR>
}<BR>
<BR>
I've been on an Flash hiatus, and must say I'm impressed with how far HydroTween's come :)
</SPAN></FONT></FONT>
<P ALIGN=CENTER>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT>
<P>
<FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
</SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
GoList mailing list<BR>
<a href="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>
</SPAN></FONT></FONT><FONT FACE="Calibri, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:11pt'><BR>
<HR ALIGN=CENTER SIZE="3" WIDTH="95%"></SPAN></FONT><FONT SIZE="2"><FONT FACE="Consolas, Courier New, Courier"><SPAN STYLE='font-size:10pt'>_______________________________________________<BR>
GoList mailing list<BR>
<a href="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>
</SPAN></FONT></FONT></BLOCKQUOTE>
</BODY>
</HTML>