Pausing movies at their ending in online experiments

I found out how to pause movies at their ending and then trigger some other action using JavaScript :slight_smile:

if (((myMovie.status == STARTED) && (myMovie._movie.currentTime >= (myMovie._movie.duration - 0.1)))) {
    myMovie.pause();
    myClock = new util.Clock;
}

if ((myMovie.status == FINISHED)) {
    if ((myClock.getTime() >= 1.0)) {
        myImage.opacity = 1;
    }
}