Novell is now a part of Micro Focus

HowTo: Add Animations to the Poem Project

Novell Cool Solutions: Feature
By Stomfi

Digg This - Slashdot This

Posted: 12 Nov 2004

StomfiLearning to use Linux at Home and Work
Welcome to my ongoing series of HowTo articles designed to help Linux newbies get comfortable with Linux. Before trying any of these HowTos, take a few minutes to study the prerequisites so you can hit the ground running.

This HowTo is going to show you how to add those animations you made with the Gimp to spice up your Poems project. The last HowTos in this series will show how to create sounds and incorporate them with the animation show. This series covers the basic use of RunRev and the shell. See last week's article for Gimp HowTo.

You will learn the basics of creating an image field, hiding and showing fields, and extending your shell scripting to pick and return a random image from an image folder.

This first screen shot shows the reader window in pointer mode. The read field is selected so we can make changes. We are going to put an image field underneath this field and swap between the two, showing the animation for a short time before showing the poem.


My animations are all smaller than the available area, but depending on the power of your computer, you can make them be as big as the read field.

You have to set this size in the Gimp when you make the animation. Mine were made with multiple shots of the same screensaver hack which I then added to the first by adding more layers and copying and pasting each other picture into the layer, saving the result as an animation.

This is how those cartoons are made that you watch on TV.


To create the image field we first have to hide the read field. We do this by clicking the Visible property so it is off.

Next we create an image called “pimage” and put it any size in the middle of the screen.

So now we set the Visible of this field to off as well.

This is how it will be normally.


The read field is normally visible. To turn this back on when we can't click the field, we select the field in the overview window, then click the properties icon in the menu above it.


This brings up the properties pop up. Click the visible property.

Next click on the select button, either in the overview window or on the button itself.

Click on the Script Tab and insert the following lines as shown. There are two insertions, the first one hides the read field, the second one selects a random image via a shell script and shows it for a few seconds, before showing the next poem.


You will notice that just before the blank line I put ThisAni into field “debug”. This is a hidden field which I use to make sure things are working. You can check the contents via the overview properties icon like we did to reset the read field. You can use the field tab on the pop up to view the content.

To write the shell script open your favourite text editor and put in this script.


Save the file to your Home folder under bin/ Make it executable like you did with the other shell scripts.

You will see that it looks for files in the folder images/anims in your Home folder.

Put all your animations here. Don't put any other type of files in this folder. Here is my folder.


Save your RunRev file. Select Browse mode and test out the new reader.

You should see this happen before the poem appears.


The next HowTo will add sounds to complete this project.

Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions.

© Copyright Micro Focus or one of its affiliates