Solved

Loop FLV file

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This is a very simple example to help those of you who are still migrating from AS2 to AS3 understand the redesigned event model in AS3. In AS2.0, event functions (that is, the function to be performed when an event is fired) were stored as a pro…
Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now