<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Eric-Paul, <div><br></div><div>Adding custom cases to Seqeuncers and other utils is a dangerous game because it's a bottomless pit. You would have to loosen the typing on the inputs of the sequencer which reduces its value quite a bit, to pull off what you're suggesting.<div><br></div><div>I like Jud's thing, <span class="Apple-style-span" style="color: rgb(31, 73, 125); font-family: Calibri; font-size: 15px; ">seq.addStep( new CallbackTrigger(myFunctionName) ); <span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; ">because it fits the paradigm. It plays by the one basic rule the sequence sets up: pass an IPlayable instance that dispatches a COMPLETE event. As a coder it shouldn't feel like a hassle to wrap the function in a new CallbackTrigger() because logically you know that you're creating a generically IPlayable wrapper that does a specific thing – that's how OO programming works. Function calls are just one of many many things people might want to do. (That said I will probably incorporate Jud's class into GoASAP because people seem to universally miss it.)</span></span></div><div><br></div><div><span class="Apple-style-span" style="color: rgb(31, 73, 125); font-family: Calibri; font-size: 15px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; ">Later if you really crave a more stripped-down syntax, write a parser that deals with all the special cases in the world – that's the level where all rules can and should be bent and blurred. </span></span></div><div><br></div><div><span class="Apple-style-span" style="color: rgb(31, 73, 125); font-family: Calibri; font-size: 15px; "><span class="Apple-style-span" style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; ">That's just my two cents; you are of course free to modify SequenceCA to your heart's content!</span></span><div><div><br></div><div>m</div><div><br></div><div><br></div><br><div><div>On Jul 3, 2008, at 3:58 AM, Eric-Paul Lecluse wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div> <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 type="cite"><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><div align="CENTER"> <font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><hr align="CENTER" size="3" width="95%"></span></font> </div><div> <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></div></blockquote> </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></div></body></html>