load movie into flv compnent in click

Posted on 2008-11-03
Last Modified: 2013-11-11
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???


Question by:judsonmusic
    LVL 39

    Expert Comment

    are u using AS2 or AS3?
    LVL 3

    Author Comment

    LVL 39

    Accepted Solution

    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.

    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 = "";
    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
    LVL 3

    Author Comment

    if i decide to use as3 what would the code be?
    LVL 39

    Expert Comment

    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.

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
    The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
    The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
    The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now