Multiple buttons activate videos in same display

Using Flash 2004

I am trying take 7 seperate flv external files each assigned on a button, and when clicked the flv video file will load in the same display. I have noted macromedia tutorials regarding five buttons acting as chapters each having sections within the video but thats too complicated fr what I’m trying to do.

I’m new to 2004 and was hoping someone could help by poitning me to an example/tutorial. Thanks.

The best thing to do is setup your video stream similar to the guys who did the Flash documentation

// Create a NetConnection object:
var netConn:NetConnection = new NetConnection();
// Create a local streaming connection:
netConn.connect(null);
// Create a NetStream object and define an onStatus() function:
var netStream:NetStream = new NetStream(netConn);

// Attach the NetStream video feed to the Video object:
my_Video.attachVideo(netStream);
// Set the buffer time:
netStream.setBufferTime(5);
// Being playing the FLV file:

This creates an object which is variable and your buttons can utilize this object and load different movies into it.

The key component you need is the Embedded Video component (2004 pro) In the code above “my_Video” refers to an instance of the Embedded Video component on the stage.

Then in your buttons you just envoke the netStream.play() and give it an address.

Like this:

button1.onRelease=function () {
netStream.play("http://www.yoursite/movie1.flv");
}

That’s it. All that code can go in a single frame, your “Actions frame”.

As far as tutorials go I don’t think there are any. I’m thinking about putting one together on this topic.

Joshua Lomelino