load movie into flv compnent in click

Can someone tell me how to load movies from a list that are buttons, onclick into a FLV component that I have on the stage??? aslo is there a way to show a loader while it is loading?

Like onclick, loadmovie into my flvCOmpnent???


Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

are u using AS2 or AS3?
judsonmusicAuthor Commented:
ok the flvplayback component has a property called contentPath which determines which video is must play.
so basically all you need to do is change the contentPath with each button click.


here's the example from the help file to create a listener to check  how far the file has downloaded.

import mx.video.*;
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
    trace("State is " + eventObject.state + "; ready to play");
    // display the no. of bytes loaded at this point
    trace("Bytes loaded: " + my_FLVPlybk.bytesLoaded);
my_FLVPlybk.addEventListener("ready", listenerObject);
my_FLVPlybk.contentPath = "http://www.helpexamples.com/flash/video/water.flv";
trace("Bytes loaded: " + my_FLVPlybk.bytesLoaded); // -1 if loading not begun


function changeVideo(url:String):Void {
my_FLVPlybk.contentPath =url;

btn1.onRelease = changeVideo(firstURL);etc
that should work, implement and let me know if there's problems

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
judsonmusicAuthor Commented:
if i decide to use as3 what would the code be?
It will be pretty much the same except how you set it up, i.e are you going to use classes etc.
couple of syntax changes

i.e. flvplayback.contentPath changes to .source etc - help file is most useful for finding out those changes.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.