[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 565
  • Last Modified:

How could I make a flv player by Flash8?

Hello, how can I make a flv player by Flash8? a simple one is OK. Would you please provide me sample codes or any good tutorials?? BestRegards, portal
0
portal123
Asked:
portal123
1 Solution
 
vishal_impactCommented:
hi here you go
To play back an external FLV file in a Flash document:
1. With the document open in the Flash authoring tool, in the Library panel (Window > Library) select New Video from the Library options menu to create a video object.
2. Drag a video object from the Library panel onto the Stage; this creates a video object instance.
3. With the video object selected on the Stage, in the Property inspector (Window > Properties) enter my_video in the Instance Name text box.
4. Open the Components panel (Window > Development Panels > Components), and drag a TextArea component to the Stage.
5. With the TextArea object selected on the Stage, enter status in the Instance Name text box in the Property inspector.
6. Select Frame 1 in the Timeline, and open the Actions panel (Window > Development Panels > Actions).
7. Add the following code to the Actions panel:

PHP Code:
// 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);
netStream.onStatus = function(infoObject) {
  status_txt.text += "Status (NetStream)" + newline;
  status_txt.text += "Level: "+infoObject.level + newline;
  status_txt.text += "Code: "+infoObject.code + newline;
};
// Attach the NetStream video feed to the Video object
my_video.attachVideo(netStream);
// Set the buffer time
netStream.setBufferTime(5);
// Begin playing the FLV file
netStream.play("videoFile.flv");

also::
Still, for the play and stop buttons, make event handlers that will trigger the NetStream:
for example

playVideo_mc.onPress=function(){
NetStream.play("yourvideo.flv");
}
let me know
Happy coding
cheers
vish
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now