Share Posted July 16, 2013 Hi, I have a simple problem, which I wondered if VideoLoader has a solution to. If not, I can achieve it manually, but thought I'd ask. I've got a simple video which repeats 3 times: vid = new VideoLoader("video.flv", {name:"vid", container:this, repeat:3}); vid.load(); I call it like this: vid.playVideo(); ...but this only works once. The second time I try to play it, it doesn't play. I tried calling it this way instead: vid.gotoVideoTime(0); vid.playVideo(); ...but then it only plays once. Is there any way to maintain the repeat settings? Link to post Share on other sites
Share Posted July 16, 2013 I see what you mean. Yeah, the repeat count wasn't updateable, but I've attached a version of VideoLoader that has a "repeatCount()" method that allows you to get/set that value. So you could do: yourLoader.repeatCount(0); yourLoader.gotoVideoTime(0, true); That should start it from the very beginning and play through all iterations. Let me know if it works well for you and I can add it to the downloads VideoLoader.as.zip Link to post Share on other sites
Author Share Posted July 17, 2013 Hi, Thanks for the update, it's really helpful. When I first tried it, I assumed it would set the number of repetitions to whatever value is passed. I guess it actually sets the current repetition (so if your repeat value is 3 and you set it to 1, it plays the loop twice more). Do you think it would be better to have two get/setters: One to set the repeat count & one to set the current repeat? Either way, I'm happy Link to post Share on other sites
Share Posted July 23, 2013 Awesome! , i didnt know of VideoLoader About count.. should'nt stuff be done external..? imo this is bloatness Imo loop:true/false comnbined with onComplete is enough? myCount = 0 myOnComplete(){ myCount++ if(myCount < 5) myVid.gotoVideoTime(0,true) } Link to post Share on other sites