First time here? First time here? Newsletter Signup Newsletter
651326 Members and growing! | Flash Jobs
Search tutorials
Author: Stephen | Website: http://www.playerdiy.com/
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.


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 Adobe Flash CS3 and import a FLV file.


import flash video

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.


rename layerStep 3: Press “F9” to bring out the Actions panel and type the following lines of code.

import fl.video.*;

var myvideoarray:Array=new Array();

myvideoarray[0] = "video1.flv";

myvideoarray[1] = "video2.flv";

myvideoarray[2] = "video3.flv";

var k:Number = 0;

myvideo.play(myvideoarray[k]);

myvideo.addEventListener(VideoEvent.COMPLETE, loadnext);

function loadnext(myevent:VideoEvent):void {

k++;

if (k>= myvideoarray.length) {

k=0;

}

myvideo.play(myvideoarray[k]);

}

Enlarge picture of code:

enlarge actionscript 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.


test flash video

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


Use playerdiy.com, 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




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

» Level Advanced

Added: 2009-09-16
Rating: 10 Votes: 1
(10 being the highest)
» Author
Stephen is an expert on web multimedia development who concentrated to give you the best solution of FLV player for website - http://www.playerdiy.com/
» Download
Download the files used in this tutorial.
» Forums
More help? Search our boards for quick answers!

Comments

  • There are no comments yet. Be the first to comment!

  • You must have javascript enabled in order to post comments.

Leave a Comment
  • Your email address will not be published. All fields are required.
Featured Flash FLA
» Author: work2survive
» Title: Girl Walking 1kb
» Description: Walking girl, animation just takes 1kb, using high heels shoes, and fashion model attitude.
Featured Sound Loops
Image for equalize

Audio Player

» Author: BoxCat
» Title: CPU Talk
» Description: From the cyberpunk RPG, "Nameless: the Hackers" Completely Free to use! Keywords: edm hip hop rap electronic mysterious mission hacking chase exciting spy ios ambient chilling love happy sad angry suspense
Latest Font
» Author: Fábio FAFERS
» Description: I created this font for free use. Everyone can apply it in personal or business texts. Its free, but I want to be communicated in case of business use. Donations are accepted to keep the project of free fonts alive! Thank you all
Featured Sound Fx
Image for equalize

Audio Player

» Author: nathan
» Description:

A recorded sound of the Dimensional Fork Gate.