Skip navigation
ie96026
Currently Being Moderated

Looping video in a MovieClip

Jul 4, 2012 4:24 AM

Tags: #video #as3 #3.0 #action_script_3 #embedded_video

I have a imported video converted to MovieClip, so that I am able to make mouse events, dragging etc to it.

 

The problem is that i want it to loop forever. Regular FLVplayback codes doesn't anymore work after converting to MovieClip.

 

I also tried to make the video as a embedded timeline video, but the video duplicates or the actions freezes after a moment.

 

Anyone know how to make MovieClip video to loop or solve the embedded video duplicating problem? Or is it possible to make the source video loop externally.

 
Replies
  • Currently Being Moderated
    Jul 4, 2012 5:57 AM   in reply to ie96026

    You might want to look into using the NetStream class instead of whatever you have done with a MovieClip and instead of using an FLVPlayback component.

     

    You might also explain what you did increating it as a MovieClip.  A MovieClip will normally loop automatically unless you place a stop() command at the end.

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 4, 2012 8:39 AM   in reply to ie96026

    If that's the option you selected when you imported it, then you need to assign an instance name to the FLVPlayback component inside the MovieClip and to the MovieClip as well.  Use  them to assign an event listener for the flv player to detect when it is done playing so you can start it playing again. 

     

    For the example shown below I have named them flvplayer and flvmc, respectively...

     

        // in the timeline containing the MovieClip...

     

        flvmc.flvplayer.addEventListener(Event.COMPLETE, playAgain);

     

        function playAgain(evt:Event):void {
            flvmc.flvplayer.play();
        }

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 5, 2012 5:25 AM   in reply to ie96026

    You're welcome

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points