Solved

Loop FLV file

Posted on 2009-05-20
2
322 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 500 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
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 goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

719 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