Desmond
09-26-2003, 12:10 PM
<HTML> <HEAD> <TITLE>Playing Multiple Video Files in Sequence</TITLE> </HEAD> <BODY> <h3>Playing Multiple Video Files in Sequence</h3> <b>Document ID: IR10028</b> <hr> The information in this article applies to: <ul> <li>AutoPlay Media Studio 5.0 Standard Edition</li> <li>AutoPlay Media Studio 5.0 Professional Edition</li> </ul> <hr> <h3>SUMMARY</h3> <p>This article describes how to play multiple video files in sequence. </p> <h3>DISCUSSION</h3> <p>In AutoPlay Media Studio 5.0, it is possible to play one video after another utilizing the On State event.</p> <p>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.</p> <p>To accomplish this:</p> <ol style="LIST-STYLE-TYPE: decimal" type="1"> <li class="kadov-p"> <p>Insert the following code into your global functions (click project, global functions):<code><pre>video_count = 1; --table index starts at 1</pre></code> </li> <li class="kadov-p"> <p>Insert the following code into the On Click event of your load button:<code><pre>video = Dialog.FileBrowse(true, "Load Videos", "", "", "", "", true, true);
<br />Video.Load("Video1", video[video_count], true, false);</pre></code> </li> <li class="kadov-p"> <p>Insert the following code into the On Finish event of your video object:<code><pre>--Traverse the table
<br />video_count = video_count + 1;
<br />
<br />--ensures a valid file will be loaded
<br />if video_count < Table.Count(video)+1 then
<br /> --load the file
<br /> Video.Load("Video1", video[video_count], true, false);
<br />end</pre></code> </li> </ol> <h3>MORE INFORMATION</h3> <p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p> <ul> <li><b>Program Reference | Actions | Video | Video.Load</b></li> </ul> <p>KEYWORDS: AutoPlay Media Studio 5.0, Load, Video, Play, Multiple Files </p> <hr> <FONT SIZE=1> Last reviewed: September 26, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>
<br />Video.Load("Video1", video[video_count], true, false);</pre></code> </li> <li class="kadov-p"> <p>Insert the following code into the On Finish event of your video object:<code><pre>--Traverse the table
<br />video_count = video_count + 1;
<br />
<br />--ensures a valid file will be loaded
<br />if video_count < Table.Count(video)+1 then
<br /> --load the file
<br /> Video.Load("Video1", video[video_count], true, false);
<br />end</pre></code> </li> </ol> <h3>MORE INFORMATION</h3> <p>For more information please see the following topics in the AutoPlay Media Studio 5.0 help file:</p> <ul> <li><b>Program Reference | Actions | Video | Video.Load</b></li> </ul> <p>KEYWORDS: AutoPlay Media Studio 5.0, Load, Video, Play, Multiple Files </p> <hr> <FONT SIZE=1> Last reviewed: September 26, 2003<br> Copyright © 2003 <A HREF="http://www.indigorose.com" target="blank">Indigo Rose Corporation</a>. All rights reserved.<br> </FONT> </BODY> </HTML>