[quoted text, click to view] Allen Hung wrote:
> *Hi folks,
> In MX2004, there is a undocumented class called tween(Please refe
> to
> the following website for detail information:
>
http://www.actionscript.org/tutorials/advanced/Tween-Easing_Classes_Documented/index.shtml)
> Now my question, is it possible to detect when the new tween object
> finishing it's job by using the listener?
>
> sample:
>
> var plsTween = new mx.transitions.Tween(gg_mc, "_alpha",
> mx.transitions.easing.None.easeNone, 0, 100, 10, false);
> // this line will make the mc "gg_mc" alpha value from 0 to 100 in 1
> frame
> time using the special effect "easing.None.easeNone"
> //Here I'd like to do something after above line code totall
> finished. *
Hi Allen.
Maybe a little bit late, but I hope this helps:
Use the addListener method of the Tween class to add a listener.
objTween = new mx.transitions.Tween(mc, "_y", easeType, begin
end, time, true);
objTween.addListener(myListener);
You can then add a funtion to objTween to process the event.
myListener.onMotionFinished = function(){
//Do stufff
}
This works fine.
There are other events available for the class, but I havn't teste
them.
Some are:
onMotionStarted
onMotionLooped
onMotionChanged
onMotionStopped
onMotionResumed
Greetings,
Andrés Coba
-
andrescoba
-----------------------------------------------------------------------
Posted via
http://www.forum4designers.co -----------------------------------------------------------------------
View this thread:
http://www.forum4designers.com/message91951.htm