A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: FLV Player with scrolling media list

  1. #1
    Member
    Join Date
    Feb 2003
    Location
    New Orleans, LA
    Posts
    78

    FLV Player with scrolling media list

    I downloaded this tutorial but I can't get it to work.

    Here's what it looks like so far:
    http://www.neworleansblack.com/tv_test.html

    I'm pretty sure I followed the directions to the tee. It is supposed to load a media list from an external xml file, autoPlay the first item in the list and play the rest sequentially. For some reason it's only loading the first video and not automatically. I'm thinking it's either an actionscript issue or a xml issue. I'm posting both in hopes that one of the geniuses here will have some insight on this.

    Actionscript:

    //Default gradient fill
    var gradientDefault:Object = new Object;

    gradientDefault.fillType = "linear";
    gradientDefault.colors = [0x000000, 0x333333];
    gradientDefault.alphas = [75, 75];
    gradientDefault.ratios = [0, 255];
    gradientDefault.matrix = new flash.geom.Matrix();
    gradientDefault.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0);

    myList.itemDefaultStyle.fillGradient = gradientDefault;

    //Over gradient fill
    var gradientOver:Object = new Object;

    gradientOver.fillType = "linear";
    gradientOver.colors = [0x000000, 0x333333];
    gradientOver.alphas = [85, 85];
    gradientOver.ratios = [0, 255];
    gradientOver.matrix = new flash.geom.Matrix();
    gradientOver.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0);

    myList.itemOverStyle.fillGradient = gradientOver;


    //Selected gradient fill
    var gradientSelected:Object = new Object;

    gradientSelected.fillType = "linear";
    gradientSelected.colors = [0x000000, 0x333333];
    gradientSelected.alphas = [95, 95];
    gradientSelected.ratios = [0, 255];
    gradientSelected.matrix = new flash.geom.Matrix();
    gradientSelected.matrix.createGradientBox(100, 50, (Math.PI * 3 / 2), 0, 0);

    myList.itemSelectedStyle.fillGradient = gradientSelected;

    //Play the first item when loading is complete
    myList.addEventListener("CONTENT_LOAD_COMPLETE", this);

    function CONTENT_LOAD_COMPLETE(evnt:Object) {

    //Select first item in the list
    myList.selectItemNum(0);

    //Get and play the first item in the list
    var item:Object = myList.getItemNum(0);

    myPlayer.autoSize = false;
    myPlayer.contentPath = item.data;
    }

    //Select next item when play completes
    var listenerObject:Object = new Object();

    listenerObject.complete = function(eventObject:Object):Void {
    myList.selectNextItem();

    //Get and play the next item
    var item = myList.getSelectedItem();

    myPlayer.autoSize = false;
    myPlayer.contentPath = item.data;
    };
    myPlayer.addEventListener("complete", listenerObject);

    //Play an item when it is clicked.
    myList.addEventListener("ITEM_ON_RELEASE", this);

    function ITEM_ON_RELEASE(evnt:Object) {
    myPlayer.autoSize = false;
    myPlayer.contentPath = evnt.target.data;
    }
    XML:

    <?xml version="1.0"?>
    <content>
    <item>
    <title>Mychal Bell Relased from Prison</title>
    <description></description>
    <thumbnailPath></thumbnailPath>
    <data>http://www.neworleansblack.com/nobtv/MychalBellReleased.flv</data>
    </item>
    <item>
    <title>Single Black Female</title>
    <description></description>
    <thumbnailPath></thumbnailPath>
    <data>http://www.neworleansblack.com/nobtv/SingleAfricanAmericanWomen.flv</data>
    </item>
    <item>
    <title>Soulja Boy How To</title>
    <description>Learn how the newest dance sweeping the country.</description>
    <thumbnailPath></thumbnailPath>
    <data>http://www.neworleansblack.com/nobtv/SouljaBoy_instructionalvideo.flv</data>
    </item>
    <item>
    <title>Health in New Orleans</title>
    <description></description>
    <thumbnailPath></thumbnailPath>
    <data>http://www.neworleansblack.com/nobtv/NewOrleansHealth.flv</data>
    </item>
    </content>

    I can also upload the .fla file if needed.
    -Dyce

  2. #2
    Junior Member
    Join Date
    Mar 2008
    Posts
    2
    Oh cool... i just learned the Soulja Boy dance from that link... ;P

    Actually, did you ever get this working? I would like to know how you fixed it.

    Thanks

  3. #3
    New Wave Visionray's Avatar
    Join Date
    May 2001
    Location
    X
    Posts
    544
    where is this tutorial? And doesn't this player use a component? You should be able to set it in the component parameters.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center