[Golist] R: Hydrotween - callbacks problems
CyberPunK
cyberpunk82 at gmail.com
Tue Jul 1 04:13:03 PDT 2008
Ups, sorry guys
Ive found out that im an idiot :D
Looks like functions declared in that way gets invoked immediately by
themselves. Was not related to Hydrotween or GO.
Changed the declaration of nested functions it in that way:
public function testTween ():void
{
//
HydroTween.go( intro, {alpha:1}, 1, 2, Sine.easeInOut, onComplete );
function onComplete():void
{
//
}
}
And it works like a charm.
Now I just miss the ability to set up a scope for the callbacks, but its
not so important ^_^
Sorry again for the false bug-alert
Alex
Da: CyberPunK [mailto:cyberpunk82 at gmail.com]
Inviato: martedì 1 luglio 2008 12.51
A: 'Mailing list for the Go ActionScript Animation Platform'
Oggetto: Hydrotween - callbacks problems
Hi list,
im having some issues with the callbacks in Hydrotween.
First of all, let me say Ive downloaded this morning the latest version of
both Hydrotween and GO from the SVN.
Heres how Im setting up my tween:
public function testTween():void
{
var intro:MovieClip = new WavesAnimationAsset() as MovieClip;
intro.alpha = 0;
addChild( intro );
HydroTween.go( intro, {alpha:1}, 1, 2, Sine.easeInOut, doComplete,
doUpdate );
var doUpdate:Function = new Function ()
{
trace( "update", intro.alpha );
}
var doComplete:Function = new Function ()
{
trace( "complete", intro.alpha );
}
}
The two callbacks, doUpdate and doComplete, are called immediately (even
before the delay) and (for the matters of onUpdate) just one time.
Dont know if its a real bug or if its related to the way Im declaring
the functions for the callback or if the version of Hydrotween and GO that
Ive took are incompatible
Im still investigating the problem.
If you guys find out a solution before I do, let me know.
Thanks
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://goasap.org/pipermail/golist_goasap.org/attachments/20080701/90b6d76c/attachment-0001.html
More information about the GoList
mailing list