Slideshow

Malte Brill revolution at derbrill.de
Mon May 23 10:32:43 EDT 2005


Hi João,

 >I am trying to build up a slideshow using revolution. I have some 200 
images
 >and a 20-minute sound track.
 >Whre can I find references, tutorials, examples, etc., a how-to that 
could
 >help me starting up this project?

There are a few ways to create a slideshow in Revolution. What I would 
need to know is if you want to sync the display of the images to the 
audiotrack or not.

A very good stack to start is provided on the Homepage of Klaus Major:

<http://major-k.de/staxx/auto_slide_lite.zip>

It demonstrate doing a slideshow (or better dissolve show) using images 
that lay in a folder close to the stack.
If you look at the stack script you find a pretty good way dealing with 
filepaths in Revolution.

What he does is getting the effective filename of the stack to find out 
where the stack is on the users Harddisc and then look for a folder 
close to that location. He changes the directory to that folder and 
looks for all files inside that folder. This filelist is put into a 
global variable and walked through line by line. The filename of the 
image in that stack is set to one image in the folder and updated by 
clicking a button. The scripts are very well documented. One thing you 
need to be aware of is that if you build a standalone from a stack the 
effective filename refers to a file inside the application bundle. So 
the images folder will need to be inside the bundle for a standalone 
for OsX, and next to the executable program for all other platforms.

One you downloaded the stack you can put your own images into the 
folder to see it working. If you have the stack open in memory after 
changing the folders content you need to type preOpenstack into the 
messagebox to update the filelist.

Once you played a while with it you can add a button to the stack. Set 
the name of the button to "startShow"

put the following script into it:

on mouseUp
   if the flag of me is empty then set the flag of me to false
   --only needed for initialisation
   set the flag of me to not the flag of me
   --this line allows you to easiely check if you need to start or stop 
the timer
   --flag has 2 possible values: true or false and changes on every 
mouseup
   if the flag of me then
     startMyTimer
   end if
end mouseUp

on startMyTimer
   send mouseUp to btn"naechstes bild"
   --to update the image
   if the flag of me then
     --check if you need to restart the timer
     --this is the short form of
     --if the flag of me is true then
     send startMyTimer to me in 5 seconds
     --finally call this handler again in 5 seconds.
     --this will go on forever unless you hit the button again or
     --set the buttons flag to false by script
   end if
end startMyTimer

For playing your audio file I suggest using a player. The file will be 
reather big, so it is not a good idea to store it in the stack. If you 
decide to use mp3 encoded files, the player is the only option to play 
back the audio.


 >Thank you very much in advance for any help you could provide.

You´re welcome. :-)

I hope this helps and is understandable. If you want to sync audio and 
image updateing you can use the callbacks of the player. If you´re 
interested in how to use them I try to explain how in another mail.

Cheers,

Malte


More information about the education-revolution mailing list