?
Solved

Loop FLV file

Posted on 2009-05-20
2
Medium Priority
?
323 Views
Last Modified: 2013-11-11
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
Comment
Question by:jmparks
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
crooksy88 earned 2000 total points
ID: 24429465
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
 

Author Closing Comment

by:jmparks
ID: 31583392
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question