public synchronized void update(long timePassed) {
        if (scenes.size() > 1) {
            movieTime += timePassed;
            if (movieTime >= totalTime) {
                movieTime = 0;
                sceneIndex = 0;
            }
            if(movieTime > getScene(sceneIndex).endTime) {
                sceneIndex++;
            }
        }
    }