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/player.zip
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
the bubbles flv videos are created with this after fx tutorial
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:
// 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:
if (someObject == "video1") {
playVideo1();
}
else if (someOther == "video2") {
playVideo2();
}
hope that helps some oneout comments/additions welcome!