Create Flash Playlist with pgLoadFlashMovie()

Procedure:
SWF files (or use your own and adjust the example file accordingly):
http://www.pgsoftwaretools.com/powerpac/assessments/swf.zip
- Put the urls for each file in the playlist into an array variable that we'll name myMovies.
- Draw a field on the page and type your movie urls each separated by a carriage return.
- Create the array by using pgSplitToArray() and specify myMovies as the return variable.
- Draw a field on the page and type your movie urls each separated by a carriage return.
- On load page, we loop through myMovies to find the first valid url (in this case it will always be the first one. Once a valid url is located ( with the Action Editor expression not ( not myMovies [ n ] ) which will equal true when the value is anything but empty or the integer 0), then we load that url with pgLoadFlashMovie() and then immediate empty that index of the array so that this movie cannot be played again (unless we reload the playlist).
Now the movie begins to play (notice that notifyObject = true so we receive a user event when the movie ends).
- Finally, we code the on user event to check when the movie has ended. If it has, then we again loop through myMovies to find the next valid url to play. When a valid url is found we call pgUnloadFlashMovie() to clear the container field and then load the next url using pgLoadFlashMovie() exactly as we had done previously for the on load page event.
- When all movies in myMovies have been played, the for each loop will fail to find a valid url at any index and exit the user event by placing our prompt text in a field to alert the user that the play list has finished.
SWF files (or use your own and adjust the example file accordingly):
http://www.pgsoftwaretools.com/powerpac/assessments/swf.zip