Click to See Complete Forum and Search --> : Code snippet needed.


Ambassador KAOS
04-03-2007, 05:30 AM
I'm attempting to take a series of jpegs (about 120-ish) and turn them into a high speed slide show to look like a subliminal message like something out of the movie "lawnmower man" so I'll need to run it at several frames per second.

I already have them sized and edited, I just need some code.

I've been told to do this I would need flash and other such nonsense that costs money but I would think that there must be some free way to program this without having to make it into a movie or use tools that require cash.

Unfortunately my html skills are sub par and all I really do is copy/paste and edit source code so thinking my way through this one is not really an option.

Does anyone have a code that I can copy and edit to make this work?

It would be much appreciated. :)

Ambassador KLOK KAOS

MstrBob
04-03-2007, 10:02 AM
This can be accomplished via Javascript, but it is certainly not the best way. If you're making a movie clip, which is what it sounds like you are doing, you should be making a movie file. For the web, Flash is certainly the simplest, most widely available option. Of course you can also use a movie editor - try searching around, there are tons available and may open source as well. Simply stitching a bunch of images together via Javascript would be a last resort sort of thing, and I advise against it.

sae
04-03-2007, 12:19 PM
you could make an animated .gif but you are limited to 256 colours and the file size might be quite large

kiwibrit
04-03-2007, 12:38 PM
Also be aware that a really high-speed slide show might be irritating, or even distressful, to some visitors.

gooncorp
04-04-2007, 01:50 PM
using javascript, if your images are named PRE###POST, where the #s stand for numbers, and PRE and POST are what's before and after, eg. img31.jpg, you would get:

var tot = 120 //total number of pics
var pre = 'img';
var post = '.jpg'
for(i=0;i<=total;i++){
document.getElementById('yourImg').setAttribute('src',pre+i+post);
}
.
You'd probably want to preload the images, however, and this could just take ages when the page is loading unless each of your images is of a very small size.