Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE FLASH:HomeFlash ForumFlash TutorialsFlash Video TutorialsWeb Streaming ForumAdobe FlashPodcast

Loop video using FLV Component?

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
GeoffTLoop video using FLV Component?
by on Dec 8, 2005 at 6:19:18 am

I can't figure out how to loop a video using the FLV component. I've tried to apply some of the recent recommendations/code, and done a fair amount of research, all to no avail. Any ideas?



Return to posts index
Reply   Like  

lajoietRe: Loop video using FLV Component?
by on Dec 8, 2005 at 2:52:45 pm

I don't have flash right in front of me to check if it's all correct, but IIRC you just need to add the following code on the frame that the FLV is playing:

ns.onStatus = function(obj) {
if (obj.code == "NetStream.Play.Stop") {
ns.seek(0);
my_ns.pause(false);
}


This basically watches for the signal that says that the video has stopped because it reached the end, then seeks to the beginning and starts playing.


Return to posts index
Reply   Like  

LeeBrimelowRe: Loop video using FLV Component?
by on Dec 8, 2005 at 8:31:51 pm

Actually to loop the an FLV using the FLVPlayback component you need to do the following...

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

The above code assumes that you have given your component an instacne name of "vid".

Lee


Return to posts index
Reply   Like  


GeoffTRe: Loop video using FLV Component?
by on Dec 9, 2005 at 4:07:54 pm

Works like a charm, Lee. Thanks for that. What does "vl" stand for? Volume?



Return to posts index
Reply   Like  

lajoietRe: Loop video using FLV Component?
by on Dec 9, 2005 at 4:36:58 pm

No, it's just a variable name. You could replace all the instances of "vl" with just about anything (that meets the requirements for variable names) and it will work. I'd assume Lee used that to be short for "Video Looper" or something similar.

Sorry about my off track reply, I didn't realize you had said you were using the component. Had I read that correctly I would have known I had no idea what I was talking about.


Return to posts index
Reply   Like  

GeoffTRe: Loop video using FLV Component?
by on Dec 11, 2005 at 9:42:30 pm

lajoiet-

hey - thanks for the help. no worries - i still learned something.

geoff



Return to posts index
Reply   Like  


empingRe: Loop video using FLV Component?
by on Dec 16, 2005 at 4:52:34 am

Sorry Lee...but I have a question about your script

I try your code, but nothing happened ...
here is my step, I have an external *.flv let's just say sample.flv

- I drag the flvplayback components to stage, and name it "vid"
- i wrote the code in the 1st frame ...

//begin code
import mx.video.*;
vid.contentPath = "sample.flv";
var vl:Object = new Object();
vl.complete = function() {
vid.play();
};
vid.addEventListener("complete", vl);

//end code

this load the flv but not loops the flv , when the movie come to and end ...

Could you please, to attach the source *.fla ...with your code ...

thx a lot

rgds

Ruddy Margono



Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]