Loading Video files, and parsing info from file name

David Comeaux's icon

Ive created a basic video player and looper. I have a folder of videos that looks like:

V01_intro.mov
V02_riff.mov
V03_verse.mov
V04_riff2.mov

I want to have three buttons: Play Previous (Intro), Play Current (Riff), Play Next (Verse). How would I go about mapping these buttons so that they 1) perform their function of taking the video clip and loading it into my video player, and 2) Parse the name of the clip and display it on the button.

Thanks for helping

Rob Ramirez's icon

use the "folder" object to load the folder contents into a "coll" object. you can parse out the file names using a "regex" object and send the label names to the "text" attribute of "textbutton" objects.