• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 553
  • Last Modified:

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???


Thanks

Judson
0
judsonmusic
Asked:
judsonmusic
  • 3
  • 2
1 Solution
 
blue-genieCommented:
are u using AS2 or AS3?
0
 
judsonmusicAuthor Commented:
as2
0
 
blue-genieCommented:
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.

so

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

so

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
0
 
judsonmusicAuthor Commented:
if i decide to use as3 what would the code be?
0
 
blue-genieCommented:
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.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now