<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:p="urn:schemas-microsoft-com:office:powerpoint" xmlns:a="urn:schemas-microsoft-com:office:access" xmlns:dt="uuid:C2F41010-65B3-11d1-A29F-00AA00C14882" xmlns:s="uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882" xmlns:rs="urn:schemas-microsoft-com:rowset" xmlns:z="#RowsetSchema" xmlns:b="urn:schemas-microsoft-com:office:publisher" xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" xmlns:c="urn:schemas-microsoft-com:office:component:spreadsheet" xmlns:oa="urn:schemas-microsoft-com:office:activation" xmlns:html="http://www.w3.org/TR/REC-html40" xmlns:q="http://schemas.xmlsoap.org/soap/envelope/" xmlns:D="DAV:" xmlns:x2="http://schemas.microsoft.com/office/excel/2003/xml" xmlns:ois="http://schemas.microsoft.com/sharepoint/soap/ois/" xmlns:dir="http://schemas.microsoft.com/sharepoint/soap/directory/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:udc="http://schemas.microsoft.com/data/udc" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:sub="http://schemas.microsoft.com/sharepoint/soap/2002/1/alerts/" xmlns:ec="http://www.w3.org/2001/04/xmlenc#" xmlns:sp="http://schemas.microsoft.com/sharepoint/" xmlns:sps="http://schemas.microsoft.com/sharepoint/soap/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:udcxf="http://schemas.microsoft.com/data/udc/xmlfile" xmlns:wf="http://schemas.microsoft.com/sharepoint/soap/workflow/" xmlns:mver="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:mrels="http://schemas.openxmlformats.org/package/2006/relationships" xmlns:ex12t="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:ex12m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:Z="urn:schemas-microsoft-com:" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Re: [Golist] HydroTween direct method calls--not callbacks? +
HydroSequence</title>
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>This is untested, but something like:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>var
seq:SequenceCA = new SequenceCA();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>var
tween:LinearGo = new LinearGo();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>tween.addCallback(myFunctionName,
GoEvent.START);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>seq.addStep(tweeen);<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>seq.start();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-family:"Calibri","sans-serif";color:#1F497D'>Maybe
there is an easier way?<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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:<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>var seq:SequenceCA = new SequenceCA();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>seq.addStep( new CallbackTrigger(myFunctionName) );<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>seq.start();<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Of course in both examples you would have other steps in your
sequence as well. <o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>http://code.google.com/p/goplayground/<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:7.5pt;font-family:"Verdana","sans-serif";
color:#1F497D'>-Jud</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p></o:p></span></p>
</div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> golist-bounces@goasap.org
[mailto:golist-bounces@goasap.org] <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<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'>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:</span><o:p></o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'><span style='font-size:11.0pt;
font-family:"Calibri","sans-serif"'>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><span style='font-size:10.0pt;font-family:"Arial","sans-serif"'>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><span style='font-size:11.0pt;font-family:"Calibri","sans-serif"'><o:p></o:p></span></p>
<div class=MsoNormal align=center style='text-align:center'><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif"'>
<hr size=3 width="95%" align=center>
</span></div>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Consolas'>_______________________________________________<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></span><o:p></o:p></p>
</div>
</body>
</html>