-1

I am frustrated by this problem and cannot understand why the code that works for others does not work for me.

import fl.video.*;

video_player.addEventListener(fl.video.VideoEvent.COMPLETE, completeF);

function completeF(e: fl.video.VideoEvent): void {

video_player.seek(0); video_player.play("SOU_LobbyAnim_01.mp4");

}

video_player.play("SOU_LobbyAnim_01.mp4");

stop();

The video plays once and then freezes. I have read one thread where the video file format was the issue (H264 .mov rather than H264 .mp4) and I would like to think this might be the issue here... but I am fairly certain my file is the latter. I do not even know how to encode an H264 .mov

I am using Animate CC and Flash Player 26.

I have run out of searches and am hoping someone can make a suggestion as to how to solve this issue.

pstadnyk
  • 1
  • 2

1 Answers1

0

Does it work better if you leave off the filename inside the complete event?

function completeF(e: fl.video.VideoEvent): void {
    video_player.seek(0);
    video_player.play();
}

It should already have the filename from the frame script; my fear is that by giving it a new filename you might be making Flash Player be doing more work than necessary.

Alternately, you might get different results with the solution found in https://gist.github.com/baamenabar/5736985 :

video_player.autoRewind = true;
video_player.addEventListener(fl.video.VideoEvent.AUTO_REWOUND, doLoop);
function doLoop(e:fl.video.VideoEvent):void
{
    e.target.play();
}
Dre G
  • 56
  • 6