[Golist] R: Hydrotween - callbacks problems

CyberPunK cyberpunk82 at gmail.com
Tue Jul 1 04:13:03 PDT 2008


Ups, sorry guys

I’ve found out that i’m 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 it’s
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,

i’m having some issues with the callbacks in Hydrotween.

First of all, let me say I’ve downloaded this morning the latest version of
both Hydrotween and GO from the SVN.

 

Here’s how I’m 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.

Don’t know if it’s a real bug or if it’s related to the way I’m declaring
the functions for the callback or if the version of Hydrotween and GO that
I’ve took are incompatible 
 I’m 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