Player created using the FLV component

Source: Internet
Author: User
Tags flv file

Create a file
First, let's make some preparations. You can create a player interface on the stage. Of course, you don't need to do anything about the buttons, you can change the button appearance in the component by modifying the component!

Call the component panel and drag the flvplayback component to the stage. We can name this component "myvideo"
Flvplayback has several attributes to note, such as auto size. You can tune them yourself to achieve the desired effect.
The contentpath attribute is used to specify the address of the FLV file to be played.
You need to specify this address dynamically to enable the player to play the desired video.
Skin is used to choose to control the appearance. We choose none. We need to use the UI to add these control components by ourselves,

When you look at the picture, you should know what they do. Drag the components you need to the proper position of the player's appearance and remember to give them
Start instance names separately, because

VaR playname = "";
// Name a variable playname = "". Remember to give it a null value so that it can be initialized every time it is loaded again.
Playname = FID + ". FLV ";
// This step is to get the parameter and add ". FLV". Isn't that a file name? :)
// What is FID? Is the variable we get from the web page :)
Myvideo. playpausebutton = myplay;
// We named myvideo before. myplay is the name of the control component we dragged to the interface.
Myvideo. stopbutton = mystop;
// Similarly, don't talk about it
Myvideo. volumebar = mysoundbar;
// Controls the video volume Slider
Myvideo. seekbar = myseekbar;
// Drag Control
Myvideo. mutebutton = mysound;
// Mute Control
Myvideo. contentpath = playname;
// The video address playname to be loaded in myvideo is included in the previous value :)

Now you can export the album to baofang.swf. Then we can insert it into the webpage.CodeSomething to change,

<%
Dim FID, swfd, URLs
FID = request ("FID ")
URLs = "bofanggood.swf? FID = "& FID
%>
<Table width = "100%" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<TD width = "210" rowspan = "2"> </TD>
<TD width = "20" rowspan = "2"> </TD>
<TD Height = "30"> </TD>

</Tr>
<Tr>
<TD> <Table width = "530" border = "0" cellspacing = "0" cellpadding = "0">
<Tr>
<TD align = "center"> <object classid = "CLSID: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width = "470" Height = "410">
<Param name = "movie" value = "<% = URLs %>"/>
<Param name = "menu" value = "false"/>

<Param name = "quality" value = "high"/> <Param name = "scale" value = "exactfit"/>
<Param name = "wmode" value = "Transparent"/>
<Embed src = "<% = URLs %>" width = "470" Height = "410" Quality = "high" pluginspage = "http://www.macromedia.com/go/getflashplayer" type = "application/X-Shockwave -Flash "scale =" exactfit "menu =" false "wmode =" Transparent "> </embed>

</Object> </TD>
</Tr>
</Table> </TD>
</Tr>
</Table>

In this case, you can create a site on iisand try it out. Of course, you need to have a few FLV videos in the folder where bofang.swf is located.
The file name is random. You only need to add the parameter *. asp? FID = File Name (do not include the FLV suffix!

We can also write a function to get the length and width of the loaded FLV file, so that it can fit our window, and then play the FLV file in the center.
You can study it on your own!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.