• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 325
  • Last Modified:

Loop FLV file

I have a super simple flash movie.
I've imported a .flv file into frame1.
I just want to make this loop when it is finished.

Any ideas?
0
jmparks
Asked:
jmparks
1 Solution
 
crooksy88Commented:
Assuming you are using AS2, drop a copy of the flv playback component into the library.

Then add the following code into frame 1 and change the relevant bits
height
width
contentpath

What this does is places a copy of the playback component onto the stage, loads in the flv, then sets up a listener for the 'complete' event. When the complete event is 'heard' the movie is told to play again.
import mx.video.*;
_root.attachMovie("FLVPlayback", "my_FLVPlybk", 25, {width:351, height:250, _x:0, _y:0});
 
_root.my_FLVPlybk.width = 351;
_root.my_FLVPlybk.height = 250;
_root.my_FLVPlybk.contentPath = "movie.flv";
 
var listener = new Object();
listener.complete = function(evt)
{
trace("complete");
   evt.target.play();
};
_root.my_FLVPlybk.addEventListener( "complete", listener );

Open in new window

0
 
jmparksAuthor Commented:
I found this simple code. I placed it on the flv component:
on (complete) {
      this.autoRewind=true;
      this.play();
}

It worked perfect. Thanks for your answer too!!!
0

Featured Post

Prep for the ITIL® Foundation Certification Exam

December’s Course of the Month is now available! Enroll to learn ITIL® Foundation best practices for delivering IT services effectively and efficiently.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now