Hello :)
1 - you can try to read this article :
http://blog.lalex.com/post/2004/09/17/Tween2-%3A-quand-Tween-rencontre-EventDispatcher
(download the sources)
2 - You can too use the AsBroadcaster implementation with addListener and
delegate the handler methods like this :
import mx.transitions.Tween ;
import mx.transitions.easing.* ;
import mx.utils.Delegate ;
var scope = {} ;
scope.toString = function () {
return "MY SCOPE" ;
}
var myMethod = function ( tw:Tween )
{
trace("> " + myMethod) ;
}
var listener:Object = {} ;
listener.onMotionFinished = Delegate.create( scope , myMethod ) ;
var tw:Tween = new Tween(mc, "_x", Elastic.easeOut, 0, 500, 24) ;
tw.addListener( listener ) ;
PS : you write in your code "Delegate.create,onTweenAFinished"... isn't a
good code ?
3 - You can use my Open Source framework with VEGAS and ASGard :
project : http://osflash.org/vegas & http://osflash.org/asgard
Install in SVN : http://svn1.cvsdude.com/osflash/vegas/ (use TortoiseSVN for
example)
Tween's examples in the SVN :
http://svn1.cvsdude.com/osflash/vegas/AS2/trunk/bin/test/asgard/transitions/
My blog in french to explain to use the SVN :
http://www.ekameleon.net/blog/index.php?2006/03/05/27--vegas-installation
EKA+ :)
2006/9/5, Patrick Matte <[EMAIL PROTECTED]>:
Is there a version of mx.transitions.Tween that works with EventDispatcher
instead of ASBroadcaster?
I'd like to delegate the onMotionFinished event on different functions
using
the addEventListener instead of addListener.
For example :
tweenA.addEventListener("onMotionFinished",Delegate.create
,onTweenAFinished);
tweenB.addEventListener("onMotionFinished",Delegate.create
,onTweenBFinished);
instead of this code which would not work...
tweenA.addListener(this);
tweenB.addListener(this);
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com