A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: xml driven video player

Threaded View

  1. #1
    Junior Member
    Join Date
    May 2012
    Posts
    3

    xml driven video player

    First of all hi everyone, I'm new here.
    I'm creating a small application that will contain a simple video player.
    I have managed to load all the content into the player and it works as it should.

    My problem is that I would like to have a grid of thumbnails next to the videoplayer so that the user will be able to scroll through them and click on individual thumbnails to load the appropriate video.

    I am using a tileList component at the moment, so far I have managed to load the images into it "within" the flash using as3. But I'd like to be able to do it dynamically from a xml file.

    I have the xml file somewhat written: (not sure if correctly)
    PHP Code:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <thumbLibrary xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <thumbs>
            <label>Iron Man 2</label>
            <imageFile>videothumb1.jpg</imageFile>
        </thumbs>
        <thumbs>
            <label>Autosport</label>
            <imageFile>videothumb2.jpg</imageFile>
        </thumbs>
        <thumbs>
            <label>GAMEFest</label>
            <imageFile>videothumb3.jpg</imageFile>
        </thumbs>
    </thumbLibrary>

    That's my as3 code at the moment, for loading the content into the tileList component.
    PHP Code:
    myTileList.addItem({label:"Iron Man"source:"thumbs/videothumb1.jpg"});
    myTileList.addItem({label:"CATERHAM"source:"thumbs/videothumb2.jpg"});
    myTileList.addItem({label:"GAMEFest"source:"thumbs/videothumb3.jpg"}); 
    Is it possible to "convert" the above as3 code so that the application loads it without me accessing script each time I want to add new stuff. I'm not sure but I think It should be based around the loop function, is that right?

    I've seen a couple of solutions for uses of tileList+XML but they use Flex, which I'm not familiar with at all.
    I've attached an image of the layout to better clarify the situation.

    If anyone can help me with this I'll be very thankful.




    EDIT:



    I understand if my explanation is a bit messy, I'm not exactly experienced in Flash area.
    I've got rather short deadline, I'd like to have that thumbnail grid working by evening of Monday 7th. (is it doable by that time?)
    If you guys need more information ask question, I'll try my best to explain the situation.
    If there is another way to create this kind of interactive thumbnail grid please do share.

    Thanks again.
    Attached Images Attached Images
    Last edited by kamiiru; 05-05-2012 at 08:01 PM.

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