Automatically play next flv video in flash video player template

If you are watching some TV series or flash videos online, of course you want to watch it one episode after another without interval.
This article is exactly about the options to play flash videos consecutively in web-based [COLOR=#284b72]flash video player[/COLOR].

Option 1. Consecutive playing flash videos with Adobe Flash CS3.

This way is basically used to play flash videos consecutively with a few lines of code. Let’s have a look:

Step 1: Open [COLOR=#284b72]Adobe Flash CS3[/COLOR] and import a FLV file.

Step 2: After inputting, rename the layer1 as “Object” and create layer2, rename it as “Action”. On the ActionScript layer, click the dot under the padlock icon. This will lock the ActionScript layer and prevent you from placing objects on it.

Step 3: Press “F9” to bring out the Actions panel and type the following lines of code.
[COLOR=#000088]import[/COLOR] fl[COLOR=#666600].[/COLOR]video[COLOR=#666600].*;[/COLOR]
[COLOR=#000088]var[/COLOR] myvideoarray[COLOR=#666600]:[/COLOR][COLOR=#660066]Array[/COLOR][COLOR=#666600]=[/COLOR][COLOR=#000088]new[/COLOR] [COLOR=#660066]Array[/COLOR]COLOR=#666600;[/COLOR]
myvideoarray[COLOR=#666600][[/COLOR][COLOR=#006666]0[/COLOR][COLOR=#666600]][/COLOR] [COLOR=#666600]=[/COLOR] [COLOR=#008800]“video1.flv”[/COLOR][COLOR=#666600];[/COLOR]
myvideoarray[COLOR=#666600][[/COLOR][COLOR=#006666]1[/COLOR][COLOR=#666600]][/COLOR] [COLOR=#666600]=[/COLOR] [COLOR=#008800]“video2.flv”[/COLOR][COLOR=#666600];[/COLOR]
myvideoarray[COLOR=#666600][[/COLOR][COLOR=#006666]2[/COLOR][COLOR=#666600]][/COLOR] [COLOR=#666600]=[/COLOR] [COLOR=#008800]“video3.flv”[/COLOR][COLOR=#666600];[/COLOR]
[COLOR=#000088]var[/COLOR] k[COLOR=#666600]:[/COLOR][COLOR=#660066]Number[/COLOR] [COLOR=#666600]=[/COLOR] [COLOR=#006666]0[/COLOR][COLOR=#666600];[/COLOR]
myvideo[COLOR=#666600].[/COLOR]playCOLOR=#666600;[/COLOR]
myvideo[COLOR=#666600].[/COLOR]addEventListener[COLOR=#666600]([/COLOR][COLOR=#660066]VideoEvent[/COLOR][COLOR=#666600].[/COLOR]COMPLETE[COLOR=#666600],[/COLOR] loadnext[COLOR=#666600]);[/COLOR]
[COLOR=#000088]function[/COLOR] loadnextCOLOR=#666600:[/COLOR][COLOR=#000088]void[/COLOR] [COLOR=#666600]{[/COLOR]
k[COLOR=#666600]++;[/COLOR]
[COLOR=#000088]if[/COLOR] [COLOR=#666600]([/COLOR]k[COLOR=#666600]>=[/COLOR] myvideoarray[COLOR=#666600].[/COLOR]length[COLOR=#666600])[/COLOR] [COLOR=#666600]{[/COLOR]
k[COLOR=#666600]=[/COLOR][COLOR=#006666]0[/COLOR][COLOR=#666600];[/COLOR]
[COLOR=#666600]}[/COLOR]
myvideo[COLOR=#666600].[/COLOR]playCOLOR=#666600;[/COLOR]
[COLOR=#666600]}[/COLOR]

Enlarge picture of code:

Note: Replace “video1” “video2” “video3” with the actual names of FLV files you just input.

Step 4: Save the file in the same folder where you input FLV file at the first beginning.

Step 5: Click “Control” and then “Test Movie” from its drop-down menu to preview the effect.

Option 2. Consecutive playing flash videos with Moyea Web Player.

Use Moyea Web Player in [COLOR=#284b72]playerdiy.com[/COLOR], there are two easy ways to achieve the goal: by interface and by code.

Let’s start to show how by interface:

Step 1: Open Moyea Web Player and import flash videos.

Step 2: Click “Template” tab, then “Options”, check the box before “Auto choose next”.

Next, we will show you how to implement the above demo by code:

Moyea software just released free FLV players for those who have no web hosting to play flash videos in variety of formats. Just copy the Embeded Code and insert a line of code to make it play flash videos consecutively.

For example: the embeded code is shown below

<script type=“text/javascript” src=“swfobject.js”></script>
<div id=“flashcontent” align=“center”></div>
<script type=“text/javascript”>
var so = new SWFObject(‘mwplayer.swf’,‘player’,‘500’,‘450’,‘9’);
so.addParam(‘wmode’,‘opaque’);
so.addParam(‘quality’,‘high’);
so.addParam(‘allowfullscreen’,‘true’);
so.addParam(‘allowscriptaccess’,‘always’);
[COLOR=#ff0000]so.addParam(‘flashvars’,‘playerOpts=autoChooseNexttrueb’);[/COLOR]
so.write(“flashcontent”);
</script>

Note: the flashvars code highlighted in red is the code to make it play flash videos consecutively.