How do I read a XML and create a list with a preview

0 favourites
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • I have tested but I only can play the list item if the video was imported to to the project files before. Is it right?

  • Is it right?

    No.. if you export with NW.js..you can set path to custom folder

  • > Is it right?

    >

    No.. if you export with NW.js..you can set path to custom folder

    Ok. Thank you for all your help korbaach

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I store information in array because I do not want to display full path to video..

    let's say you have on server something like this..

    you can use list.php to get all sub-folders and files in video folder

    <?php
    function listFolderFiles($dir){
        $ffs = scandir($dir);
       
        foreach($ffs as $ff){
            if($ff != '.' && $ff != '..'){
               echo $ff. PHP_EOL;
             if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff);}}}
    
    listFolderFiles('video');
    exit;
    ?>[/code:3rrvwo6w]
    so..your ajax data will look like this:
    [img="http://lookpic.com/O/i2/1364/e8EIVxSr.png"]
    
    now you can loop through data and populate array and list object..
    
    [url=https://app.box.com/s/nozesa4msrfq346aoohpq8ovmaicxvic]phpDir2List.capx[/url]
    
    if you upload a new videos or delete..even sub-folders in [b]videos/video[/b] folder..
    you do not have to make any changes in php script or C2 code...
    

    Hello korbaach

    I'm still stuck in this demo project. I had to give up the CSV because they don't want to include the data in this file manually. I need to read the files in the folder and create a list with these files and show or play a preview when the user select the item in the list. Can I use this kind of solution that you created for this? I know the php only works in the online projects. But I can use other solution than php?

    Thanks in advanced

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)