In this tutorial, you will learn how to create dynamic FLV player in Flash. The FLV file URL will be passed to the player in the embed code with the help of FlahVars. Flash 8
Output:
Download Source File
Step 01: Create a new flash document and save it as "flvplayer.fla"
Step 02: Click Window and select Components (or) press Ctrl + F7 to open the Components panel.
Step 03: In the Components panel, locate FLV Playback. Click and drag it to the board.
Step 04: Resize the FLV Playback component to your desired dimension.
Step 05: Left click the FLV Playback component, open properties panel (Ctrl + F3). Give "flv" as the instance name to the component.
Step 06: Now click the frame at the top and open the action script panel, press F9 to open it.
Ste 07: Copy and Paste this action script code in that frame:
flv.contentPath = flvurl;
Step 08: Your FLV player is ready, Now we need to make use of FlashVars to pass the flv file URL. FlashVars are used in the PARAM tag in the embed code.
Step 09: Create a HTML page in the same location of the flvplayer.fla and save the HTML page as flvplayer.html
Copy and paste this code in that HTML page:
< embed src="flvplayer.swf" flashvars="flvurl=movie.flv" type="application/x-shockwave-flash" height="290" width="300">< /embed>
Step 10: In the above code, change the value of the flvurl variable to the the location where your FLV file is located.
- End of Tutorial.
Labels: ActionScript 2, Flash, Flash Intermediate, FlashVars, Tutorials
Post a Comment
i find this tutoriol realy nice and easy one. i never thought creating a dynamic movie is is so easy. thanke
but i have question... what if i have more then one flv file to play dynamically one by one plz solv this prob.
thak you onecagain
I think you should make changes in the FLV player itself. I will do some search on this issue, and post a good tutorial soon on your question.
Very nice! I used 3days to search for this solution!
Thanks mate!
flv.contentPath = flvurl; works in Flash9? I cannot find the way to make it work to take advantage of the full screen option template
Spent a few hours on an different, older tutorial that left me scratching my head. This one worked exactly as planned. Thanks for sharing.
in AS 3.0 flv.source = flvurl
hi, your tutorial helped me a lot. i would like to know how can i add total time/ time remaining in this video player.
vineet
Simple and very useful
Thanks!
I tried this and it doesn't work. I also downloaded the source files and that doesn't work either. Please help
|