foo123 / as3-transitions-lib

Image Transitions Library for Actionscript 3

Home Page:https://foo123.github.io/examples/as3-transitions-lib/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add listener on transition compelete

xiaobuxun opened this issue · comments

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);
    }

It's in the manual explained. The event is called somewhat flatly Transition.eventType, but read the manual its there