Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

How to loop FLV video

已查看 4,740 次
跳至第一个未读帖子

mouser

未读,
2007年9月16日 17:45:172007/9/16
收件人
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

未读,
2007年9月16日 19:02:052007/9/16
收件人
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

未读,
2007年9月17日 09:26:462007/9/17
收件人
Thanks. It works.

donkiekong76

未读,
2007年11月2日 12:43:012007/11/2
收件人
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

未读,
2007年11月2日 12:46:582007/11/2
收件人
What are you Actionscript publish settings? AS2 or AS3?

donkiekong76

未读,
2007年11月2日 12:54:162007/11/2
收件人
action script 3

dzedward

未读,
2007年11月2日 12:56:422007/11/2
收件人
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

未读,
2007年11月2日 13:10:472007/11/2
收件人
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

未读,
2007年11月2日 13:18:382007/11/2
收件人
you do not need that.

XiRoCCo

未读,
2008年4月15日 13:40:002008/4/15
收件人
Thanks for this thread, and dzedward - thanks for the AS3 looping code! Works like a charm.

jras...@gmail.com

未读,
2012年6月21日 15:37:042012/6/21
收件人
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

未读,
2012年6月21日 16:00:262012/6/21
收件人
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

未读,
2014年11月19日 06:58:252014/11/19
收件人
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 个新帖子