Add listener on transition compelete
xiaobuxun opened this issue · comments
Li Gang commented
Hello,
I am going to make a transition repeat, and I don't found any param for repeat, so I want to add a linstener on transition compelete. So my question is whitch event I need to listen? Here is my demo code. Any help?
private function testfun():void {
var pic = document.getElementById("image-fade");
var pic2 = document.getElementById("image-fade2");
var foo=new Dissolve();
addChild(foo);
foo.doit({
toTarget:pic,
fromTarget:pic2,
duration:40,
easing:None.easeInOut
});
foo.addEventListener("transitionOutDone", nexttest);
}
private function nexttest(event:Event):void {
var pic = document.getElementById("image-fade");
var pic2 = document.getElementById("image-fade2");
var foo=new Dissolve();
addChild(foo);
foo.doit({
toTarget:pic,
fromTarget:pic2,
duration:40,
easing:None.easeInOut
});
foo.addEventListener("transitionOutDone", nexttest);
}
Nikos M. commented
It's in the manual explained. The event is called somewhat flatly Transition.eventType
, but read the manual its there