PDA

View Full Version : One-Page Slide Show


Toosheds
02-25-2005, 12:02 PM
With help from TJ Tigger I have made a one-page slide show which runs automatically and allows viewer navigation via thumbnails. It almost seemed to be too easy to be true once I dove into the project; I had imagined it would take me, a non-programmer, several hours or even days. Using a project Tigger sent me and information from this thread:

http://www.indigorose.com/forums/showthread.php?t=6950&highlight=multiple+timer

I was able to cobble together a working version of exactly what I wanted in less than an hour.

This might seem just a kiddie project for some of the code crunchers out there, but I've been looking in this forum for this solution for a while now. Maybe I searched for the wrong things and did not find previous threads, but please indulge my happiness at being able to contribute something hopefully new to the forum.

This forum is great!

Now, can anyone help work transitions into the slide show?

Thanks!

Worm
02-25-2005, 12:27 PM
Nice job!

Now think of all the cool things you could do on your lunch hour :D

For transitions, you might have a look-see at this thread:
http://www.indigorose.com/forums/showpost.php?p=37785&postcount=6

Brett
02-25-2005, 12:38 PM
Very cool project. Good job!

I was playing with your On Timer event and reduced the code to this:

timercounter = timercounter + 1;
for i = 1,5 do
Image.SetVisible(i, timercounter == i);
end
if(timercounter >=5)then timercounter = 0; end

I am not taking away from what you did - your method works, but hopefully the above code witll help you learn new scripting techniques. :yes

Toosheds
02-25-2005, 01:46 PM
I am not taking away from what you did - your method works, but hopefully the above code witll help you learn new scripting techniques.

Sure does! I forgot to add to my message something along the lines of "feel free to clean up or improve upon the code."

Glad you like it!

Toosheds
02-25-2005, 02:05 PM
Brett,

I have implemented this into my real project, in which three happen On Timer or when a thumbnail is clicked: the photo changes, a caption changes, and a thumbnail highlight "moves" to the TB of the current photo displayed. So for each event, two Images and one Label change.

In implementing your code changes, I know I have to pay attention to object names. In the test project the images are objects named numerically 1 thru 5. Will I have to name the other images and labels as numbered only objects (e.g. photos are 1-10, captions are 21-30, and thumbnail highlights are 51-60), or can I use Foto1, Caption1, Highlight1, etc?

Also, must I use other vaiables other than "i" for the other objects, and would I leave out "timercounter == i" for the actions on the objects?

Thanks!

Brett
02-25-2005, 02:55 PM
Well, you could adjust it to use a table of information for the image objects and then use the index to access them. For example:

tblImages = {};
tblImages[1] = {ObName="Image1",Caption="Nice Picture"};
tblImages[2] = {ObName="BeachImage",Caption="The beach"};

and then access them by index:

strCaption = tblImages[i].Caption;

etc...

Toosheds
02-26-2005, 08:11 AM
Well, that was a bit over my head. I tried for hours this morning to figure out tables, and while I understand their purpose and value, I seemed to produce only a jumble of errors. Even though I implicitly understood the script Brett posted for the simple slide show, the deeper I delved into scripting this morning, the cloudier my vision got.

Anyway, I've attached a long-way-around version of what I am ultimately trying to achieve, if anyone want to take a crack at tidying up the code into scripts.


;->

Corey
02-26-2005, 08:31 AM
There's a free video on Tables at http://www.speedytraining.com which is pretty good at explaining it in a simple way. Plus I'm happy to answer any questions you may have anytime. You'll be amazed how easy they are to learn and use once it clicks in, but I know what you mean about checking them out for the first time, it can seem a bit confusing at times. I think the easiest way to think of tables is as a grid. Once you can picture it in your mind, then I think it's all downhill from there. :) :yes

Toosheds
02-26-2005, 08:42 AM
Worm, that is exxxactly what I am looking for! (I figured that opacity would be the key.) However, as is apparent in my previous post, it is gonna take me some time before I learn enough to be able to utilize those scripts.

:-(

Toosheds
02-26-2005, 09:17 AM
I guess I should buy the CDs, Corey. I liked all the video samples available on that site! Tables as a concept are not really the problem as much as scripting terms and puctuation, total lack of scripting experience, and shortage of time. But I'll keep plugging away ;) so my projects keep getting better, more efficient, and more useful.