Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to loop FLV video

4,740 views
Skip to first unread message

mouser

unread,
Sep 16, 2007, 5:45:17 PM9/16/07
to
I created a Quicktime file, then imported it into a Flash document as an FLV
file. I will then export to an SWF file. However, I need the SWF file to
loop continuously. How to I do this? I assume I need to do this looping
command to the FLV file in the Flash document BEFORE I export to SWF. If it's
an "action" command, please give me a step by step. Thanks.

dzedward

unread,
Sep 16, 2007, 7:02:05 PM9/16/07
to
click the component on stage, look down in the properties inspector and you'll
see <instance name>, click that and type, flvPlayer. Then click the frame that
this resides on, open up the actions panel, make sure it says Actions-Frame in
the upper left hand corner.. paste this.

var myLis:Object = new Object;
myLis.complete = function(){
flvPlayer.play();
}
flvPlayer.addEventListener("complete", myLis);

mouser

unread,
Sep 17, 2007, 9:26:46 AM9/17/07
to
Thanks. It works.

donkiekong76

unread,
Nov 2, 2007, 12:43:01 PM11/2/07
to
I'm trying to do the same thing, but when I tried the script, I got this error:
"1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function.

dzedward

unread,
Nov 2, 2007, 12:46:58 PM11/2/07
to
What are you Actionscript publish settings? AS2 or AS3?

donkiekong76

unread,
Nov 2, 2007, 12:54:16 PM11/2/07
to
action script 3

dzedward

unread,
Nov 2, 2007, 12:56:42 PM11/2/07
to
im going to assume AS3 since the nature of the Error. You will need to use AS3
syntax, my earlier post is AS2 syntax. This is what you need.

import fl.video.VideoEvent;
flvPlayer.addEventListener(VideoEvent.COMPLETE, videoFinished);
function videoFinished(event:Event){
flvPlayer.play();
};

donkiekong76

unread,
Nov 2, 2007, 1:10:47 PM11/2/07
to
awesome, that worked. Thank you very much.

I have another question. While I was looking up a solution for this, I found
the following AS2 script which you're supposed to apply to an flv object, I
believe:

on (complete) {
this.autorewind =true;
this.play();
}

Is there an AS3 equivalent to this script?

dzedward

unread,
Nov 2, 2007, 1:18:38 PM11/2/07
to
you do not need that.

XiRoCCo

unread,
Apr 15, 2008, 1:40:00 PM4/15/08
to
Thanks for this thread, and dzedward - thanks for the AS3 looping code! Works like a charm.

jras...@gmail.com

unread,
Jun 21, 2012, 3:37:04 PM6/21/12
to
On Tuesday, April 15, 2008 1:40:00 PM UTC-4, XiRoCCo wrote:
> Thanks for this thread, and dzedward - thanks for the AS3 looping code! Works like a charm.

I don't see where to paste the code. I'm using CS6. When I open up the "Actions" panel, it just says "Actions" in the upper-left, not "Actions-Frame".

I'm surprised Flash doesn't simply have a checkbox that you can click to tell the video to loop. Why make it so complicated?

jras...@gmail.com

unread,
Jun 21, 2012, 4:00:26 PM6/21/12
to
Where do you place this code? I tried placing it in the COMPLETE event, but when I tried to publish the file, I get this error:
Scene 1, Layer 'Layer 1', Frame 1, Line 7 1118: Implicit coercion of a value with static type Object to a possibly unrelated type Function.

thereap...@gmail.com

unread,
Nov 19, 2014, 6:58:25 AM11/19/14
to
For the code to work, you will have to make a new layer above your animation layer, then in a single above the component, paste the code (in the new layer)

0 new messages