@Override
    public void setTime(float time) {
        super.setTime(time);
        if (!animationName.equals(channel.getAnimationName())) {
            channel.setAnim(animationName, blendTime);
        }
        float t = time;
        if (loopMode == LoopMode.Loop) {
            t = t % channel.getAnimMaxTime();
        }
        if (loopMode == LoopMode.Cycle) {
            float parity = (float) Math.ceil(time / channel.getAnimMaxTime());
            if (parity > 0 && parity % 2 == 0) {
                t = channel.getAnimMaxTime() - t % channel.getAnimMaxTime();
            } else {
                t = t % channel.getAnimMaxTime();
            }

        }
        if (t < 0) {
            channel.setTime(0);
            channel.reset(true);
        }
        if (t > channel.getAnimMaxTime()) {
            channel.setTime(t);
            channel.getControl().update(0);
            stop();
        } else {
            channel.setTime(t);
            channel.getControl().update(0);
        }
    }
creates an animation event

@param model the model on which the animation will be played
@param animationName the name of the animation to play
@param initialDuration the initial duration of the event
@param loopMode the loopMode
@see LoopMode
@param channelIndex the index of the channel default is 0. Events on the
    same channelIndex will use the same channel.
jme3-core/src/main/java/com/jme3/cinematic/events/AnimationEvent.java