I am trying to create a website where 8 video screens play simultaneously. I need to be able to play them continuously one after the other and I also need the option to be able to go forward and backward within the individual video screens with the click of buttons. This is the bigger picture.
Right now, I am creating a movie clip for each video screen. Within the movie clips I am creating a previous button and a next button to go through the 5 videos on each video screen. I am loading in the flv’s externally. I also tried loading swf’s that held flv’s externally. The video is loaded in on each frame within the movie clip. Each video is 10 seconds long so I set a Timer for it to play for 10 secs and then automatically go to the next frame or go to the specific frame label.
This all seems to work- playing the videos for 10 seconds and then advancing and hitting the next button to play the next video. However, when I hit the button to have it go to the previous frame and play that previous video it doesn’t go to that previous video and things go a bit haywire.
I have uploaded the fla file and the swf file to my webspace so you can see the code and what the heck i am talking about. here are the links:
http://www.kaceymorrow.com/tenseconds5-20.2.swf
http://www.kaceymorrow.com/tenseconds5-20.2.fla
The knobs on the tv’s are the buttons.
In the fla file double click on the top tv in the second column of tv’s on the left or the one with the symbol name, crystalmonday. This is a movie clip playing 5 videos in a row and containing buttons that go to the next and previous videos.
Here is a sample of the code that lies on the first frame within that movieclip:
stop();
var videoConnection:NetConnection = new NetConnection();
videoConnection.connect(null);
var videoStream:NetStream = new NetStream(videoConnection);
videoStream.play(“crystalmonday.flv”);
var video:Video = new Video();
video.attachNetStream(videoStream);
addChild(video);
video.x = 218.8
video.y = 288.1
video.width = 150
video.height = 112
var metaListener:Object = new Object();
metaListener.onMetaData = onMetaData;
videoStream.client = metaListener;
function onMetaData(data:Object):void
{
}
var Timer1:Timer = new Timer(10000);
Timer1.addEventListener(TimerEvent.TIMER, Forward1);
Timer1.start();
function Forward1(event:TimerEvent):void
{
gotoAndStop(“two”);
}
function onClick(event:MouseEvent):void
{
gotoAndStop(“two”);
}
crystalnext.addEventListener(MouseEvent.CLICK, onClick);
//This is on the second frame:
stop();
videoConnection.connect(null);
videoStream.play(“crystalmondaytime1.flv”);
video.attachNetStream(videoStream);
addChild(video);
video.x = 218.8
video.y = 288.1
video.width = 150
video.height = 112
metaListener.onMetaData = onMetaData2;
videoStream.client = metaListener;
function onMetaData2(data:Object):void
{
}
Timer1.addEventListener(TimerEvent.TIMER, Forward2);
Timer1.start();
function Forward2(event:TimerEvent):void
{
gotoAndStop(“three”);
}
function onClick1(event:MouseEvent):void
{
gotoAndStop(“three”);
}
crystalnext.addEventListener(MouseEvent.CLICK, onClick1);
function onClick3(event:MouseEvent):void
{
gotoAndStop(“one”);
}
crystalprev.addEventListener(MouseEvent.CLICK, onClick3);
//and so on for 3 more frames . . .
please any help on what I can do to get this previous button to work?