View Full Version : Linking FLV Files with AS3
platinumb
May 13th, 2009, 11:52 AM
ok so i've created (X) amount of .flv's and i basically want a slide show but i didn't want to make it all one file bfcuase the time line would be longer then my life can anyone help me out? i need to link all the files so that when i play the first one it will auto load the rest one after another.
-Brandon Hooey
platinumb
May 13th, 2009, 02:27 PM
even if anyone has any ideas on how to do this or knows where i should look to find a solution that'd be much appricaited aswell.
alemieux34
May 13th, 2009, 03:25 PM
Are you using the FLV Playback Component or are you just loading the movies in with a loader?
Essentially, what you'll need is a listener to listen for the COMPLETE event of the FLV. Then that would be connected to a function that calls on the next movie. I've seen this as an FLA you can purchase on FlashDen (http://www.flashden.net).
even if anyone has any ideas on how to do this or knows where i should look to find a solution that'd be much appricaited aswell.
Daganev
May 13th, 2009, 03:56 PM
No, need to purchase it, its really easy
var movieArray = new Array ("/flvs/flv1.flv", "/flvs/flv2.flv","/flvs/flv3.flv", etc);
var nextIndex = 0;
flvPlayback.addEventListener(VideoEvent.COMPLETE, playNextVideo);
flvPlayback.autoPlay = true;
flvPlayback.source = movieArray[nextIndex];
function playNextVideo(e:VideoEvent):void
{
nextIndex++
if(nextIndex >= movieArray.length)
{
nextIndex = 0;
}
flvPlayback.source = movieArray[nextIndex];
}
platinumb
May 14th, 2009, 11:56 AM
Daganev thank you so much thats EXACTLY what i was looking for you just made my day awhole lot easier... woot woot lol... and stupid question when it gets to the end of the clip... how can i loop it with AS3?
Daganev
May 14th, 2009, 02:26 PM
flvPlayback.stop();
flvPlayback.start(); don't change the source :)
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.