Play Multiple Video Files in Sequence
In AutoPlay Media Studio, it is possible to play one video after another utilizing the On Finish event.
As an example, we will create a project with one button object and one video object. The user will click on the button, and load multiple videos into a table. The project will then play one video after another until each video has been played.
To accomplish this:
In AutoPlay Media Studio, it is possible to play one video after another utilizing the On Finish event.
As an example, we will create a project with one button object and one video object. The user will click on the button, and load multiple videos into a table. The project will then play one video after another until each video has been played.
To accomplish this:
- Insert the following code into your global functions (click project > functions):
Kod:
--table index starts at 1
video_count = 1;
- Insert the following code into the On Click event of your load button:
Kod:
video = Dialog.FileBrowse(true, "Load Videos", "", "", "", "", true, true);
Video.Load("Video1", video[video_count], true, false);
- Insert the following code into the On Finish event of your video object:
Kod:
--Traverses the table
video_count = video_count + 1;
--ensures a valid file will be loaded
if video_count < Table.Count[video]+1 then
--loads the file
Video.Load("Video1", video[video_count], true, false);
end