# Quick and easy flv player/selector

**URL:** https://forum.kirupa.com/t/quick-and-easy-flv-player-selector/219953
**Category:** flash
**Created:** [March 21, 2007, 2:05pm UTC](https://forum.kirupa.com/t/quick-and-easy-flv-player-selector/219953 "2007-03-21T14:05:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![ALGORYTHM](https://avatars.discourse-cdn.com/v4/letter/a/c4cdca/32.png) [@ALGORYTHM](https://forum.kirupa.com/u/ALGORYTHM)
#### Post date: [March 21, 2007, 2:05pm UTC](https://forum.kirupa.com/t/quick-and-easy-flv-player-selector/219953/1 "2007-03-21T14:05:09Z")

</div>

first, hello to everyone here i have been lurking here for a few weeks now learning some good stuff so here’s a small contribution in return. 😃

it’s basically a simple way to load different flv files, i found a couple of ready made files that were great but over complicated so i knocked up something simple.

first, the ‘finished’ product and source:

[http://algorythm.co.uk/design/vplayer/](http://algorythm.co.uk/design/vplayer/)

[http://algorythm.co.uk/design/vplayer/player.zip](http://algorythm.co.uk/design/vplayer/player.zip)

[http://algorythm.co.uk/design/index.php?path=vplayer/](http://algorythm.co.uk/design/index.php?path=vplayer/)

the flv player is the **FLVPlayback** component from Flash 8, it uses the Blue Plastic Skin from theflashblog:

[http://theflashblog.com/?p=122](http://theflashblog.com/?p=122)

the bubbles flv videos are created with this after fx tutorial 😉

[http://www.kirupa.com/developer/flash8/flashvideoloops.htm](http://www.kirupa.com/developer/flash8/flashvideoloops.htm)

method:

on the stage i dropped the **FLVPlayback** component in place and set my own prefs for it. i left **contentPath** unset. i named the instance **theVideo**.

i then created a button and dragged two instances on to the stage and named the instances **video\_button1** and **video\_button2**.

the actionscript placed in frame 1:

```auto

// load video 1 by default
	theVideo.contentPath = "bubbles.flv";

// video 1
video_button1.onPress = function() {
	playVideo1();
};
function playVideo1() {
	theVideo.contentPath = "bubbles.flv";
}
// video 2
video_button2.onPress = function() {
	playVideo2();
};
function playVideo2() {
	theVideo.contentPath = "bubbles1.flv";
}

```

i believe making the button presses into functions is the best way to do this, so the functions can be called by other methods if need be for example:

```auto
if (someObject == "video1") {
playVideo1();
} 
else if (someOther == "video2") {
playVideo2();
}

```

hope that helps some oneout 🙂 comments/additions welcome!
