Groups | Blog | Home
all groups > flash (macromedia) > december 2006 >

flash (macromedia) : String many flvs in a swf?


Kellyman
12/27/2006 9:59:50 PM
Is there an easy way to call on successive flv files (6 different movies)
within a swf file? Is there an easy explaination? I'm setting up a
touch-screen kiosk that will have a "splash" screen of 6 different videos
(30-second commercials). If a person clicks on the screen (entire button), it
will jump to the "main section." I have the main section swf, but am having
trouble connecting the 6 separate flv files in a single .fla file..... Yes,
I've searched the forums... must be missing something!
urami_
12/28/2006 2:31:11 PM


[quoted text, click to view]


All you need is give the flv playback component some instance name and use
simple action attached to your buttons:

on (release) {
my_FLVPlybk.load("a.flv");
my_FLVPlybk.play();
}


on (release) {
my_FLVPlybk.load("b.flv");
my_FLVPlybk.play();
}

etc...

It will load the movie dynamically into your player. Regardless how many and
how big.

--
Best Regards

Urami


--

!!!!!!! Merry Christmas !!!!!!!


<urami>
If you want to mail me - DO NOT LAUGH AT MY ADDRESS
Nickels55
12/28/2006 3:00:18 PM
Kellyman
12/28/2006 4:03:21 PM
Nickels55
12/28/2006 6:21:30 PM
For this to work you need to do some import things. Give the playback component
an instance name of vid. Your movies must be named with sequential names like:
Movie_0.flv, Movie_1.flv, Movie_2.flv, Movie_3.flv....
This code assumes there is only 5 videos. You can fix this be adjusting the
code below where it is commented.

_global.moveNum = 0;
vid.contentPath = "Movie_"+_global.moveNum+".flv"; //Name of 1st video clip

var vidList : Object = new Object();
vidList.complete = function() {
_global.moveNum++

if (_global.moveNum < 5) { //this is the total amount of videos
vid.contentPath = "Movie_" + _global.moveNum + ".flv";
} else {
// what do you wanna do after last clip?
gotoAndStop("fin"); // goes to frame labeled fin
}
}
vid.addEventListener ("complete",vidList);
stop();

Let me know if you need this explained more... or if you have any issues
getting it to work.
AddThis Social Bookmark Button