[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Loop FLV file

Posted on 2009-05-20
2
Medium Priority
?
324 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
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,…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.
Suggested Courses

656 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