Hrvojeee
unread,Apr 29, 2009, 11:10:32 AM4/29/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Baltimore SWF
Hello
i am working on a html website where i want to place 4 different .flv
videos. I tried to make separate .swf files out of them and make
another separate .swf file in which the other swf files would be
loaded but i had no luck.
So this is the situation: i have 4 .flv files (or .swf files)out of
which the first one (intro) lasts around 30 seconds and has 9MB, and
the other 3 files last 10 seconds each and have 2MB. Now i want this
to happen: when the user comes to the webpage, the videos start
playing automatically and they play in a sequence but the first video
plays only once and the others play in a loop for the whole time the
user is on the webpage (so it would go like this: 1. then 2. then 3.
then 4. then 2. then 3. etc). The other problem is that i want to
position the videos on different parts of the webpage that is made in
html. Can this be done and how?? please help me! or direct me!
I tried with this in the separate .fla loader file (this is in my
actions layer frame 1 and another layer with the movieclip with the
instance name theTargetClip_mc and the swf files are in the same
folder as this swf file) :
var currentSwf:Number = 0;
var swfs:Array = new Array(
"swf1.swf",
"swf2.swf",
"swf3.swf"
);
var listener:Object = new Object();
var mcl:MovieClipLoader = new MovieClipLoader();
mcl.addListener(listener);
// Function to load the "next" movie. It uses the current value of
currentSwf
// to access the swfs array, then increments that value. This version
loops
// around to the beginning after the last one.
function loadNext():Void {
mcl.loadClip(swfs[currentSwf], theTargetClip_mc);
currentSwf++;
if (currentSwf >= swfs.length) currentSwf = 0;
}
// When the swf loads, set it up to constantly check its current frame
// against the total frames, and if those match, the swf is done
playing.
// If that's the case, then load the next one.
listener.onLoadInit = function(targ:MovieClip):Void {
theTargetClip_mc.onEnterFrame = function():Void {
if (this._currentframe == this._totalframes) {
loadNext();
delete this.onEnterFrame;
}
}
}
loadNext();
thank You very much!