all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

loop a different flv after the first .flv ends


loop a different flv after the first .flv ends gwu630
4/29/2006 11:53:30 PM
flash actionscript:
Can someone point me to a tutorial or page to make this idea work?

I want to loop a different .flv after the movie player played the initial .flv file.

Re: loop a different flv after the first .flv ends Motion Maker
4/30/2006 7:07:31 PM
Kinda depends on your application such as are you using the FLVPlayer or
writing Actionscript yourself. Where are the FLV URI's stored or gotten?

If the FLVPlayer, just change the contentPath property
http://livedocs.macromedia.com/flash/8/main/00003539.html.
my_FLVPlybk.contentPath = streamURI;

If AS
my_ns.close();
my_ns.play(streamURI);

In either case you could keep the FLV URIs in an array or get them from a
ComboBox or other possible design choices.

--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
Can someone point me to a tutorial or page to make this idea work?

I want to loop a different .flv after the movie player played the initial
..flv file.

Thanks

Re: loop a different flv after the first .flv ends gwu630
5/1/2006 12:00:00 AM
Thanks Motion Maker.

I am using the Flash 8 video player component that has a component panel which
I can input one movie path url. How can it tell it to loop a second movie after
the first one is done?

Please advise.

Thanks,
gwu630
Re: loop a different flv after the first .flv ends Motion Maker
5/1/2006 3:06:37 PM
We are assuming "Flash 8 video player" means the FLVPlayback Flash 8
component.

You need to give the FLVPlayer instance a name in the properties window on
stage. Ex below uses myFlvPlayer.

Clear the contentPath parameter on stage in the properties window.

Add this code to the timeline:

var myPlayListIndex:Number = -1;
var myPlayList:Array = new Array();


// Add these lines for each flv file
myPlayList.push("yourfirst.flv");
myPlayList.push("yourSecond.flv");
myPlayList.push("yourthird.flv");



function playNextFlv()
{
trace("playNextFlv()");
if (myPlayListIndex < myPlayList.length - 1)
{

myFlvPlayer.contentPath = myPlayList[++ myPlayListIndex];

}
}

myFlvPlayerListener = new Object()
myFlvPlayerListener.complete = function(evt)
{
trace("myFlvPlayerListener.complete - evt:" + evt.target);
playNextFlv()
}
myFlvPlayer.addEventListener("complete", myFlvPlayerListener);
playNextFlv();


--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
Thanks Motion Maker.

I am using the Flash 8 video player component that has a component panel
which
I can input one movie path url. How can it tell it to loop a second movie
after
the first one is done?

Please advise.

Thanks,
gwu630

Re: loop a different flv after the first .flv ends gwu630
5/4/2006 6:04:35 AM
Re: loop a different flv after the first .flv ends Motion Maker
5/4/2006 10:10:04 PM
import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.complete = function(eventObject:Object):Void
{
my_FLVPlybk.play();
};
my_FLVPlybk.addEventListener("complete", listenerObject);
my_FLVPlybk.contentPath =
"http://www.helpexamples.com/flash/video/water.flv";



--
Lon Hosford
www.lonhosford.com
May many happy bits flow your way!
[quoted text, click to view]
Can someone show me how to loop a flv movie?

Re: loop a different flv after the first .flv ends gwu630
8/15/2006 12:00:00 AM
AddThis Social Bookmark Button