Log in

View Full Version : Simple script for TV work



carabus
09-13-2012, 09:44 AM
Hi All,

First post from someone not too skilled in scripting, mostly graphic background who has a small job for a TV project.

The want a sequence of slides (currently jpgs) to change on touch for the character to interact with a computer entering a pin sequence and then some display, I have added in various formats and found that there is a flash between slide I need to get rid of. I was thinking of pre-loading the images and then having them change with no transition, not being a flash guru either I thought a script would be able to do the job?

Any help please would be appreciated!

Thanks

Carabus

bernie1227
09-13-2012, 10:10 AM
preloading and caching is probably the best way, I'd suggest staring off by googling 'javascript preloading', which will give you a bunch of scripts, or you could go for the dd preloader here (http://www.dynamicdrive.com/dynamicindex4/preloadimage.htm), but at any rate, I suggest you read [this (http://perishablepress.com/3-ways-preload-images-css-javascript-ajax/).

carabus
09-13-2012, 11:49 AM
That's a great start thank you very much.

As a little more info (I have to be careful what I say) the jpg's are 1024x768 and will run full screen on a fixed computer not via the web so that should speed it up. Having the pages as HTML in the current format, each click going to the next page in sequence creates the flash as the pages load, pre-loading will remove this?

Question how will I then get the next image to load on touch within the code without going to another html page?

Thank in advance.

Carabus

djr33
09-13-2012, 05:43 PM
You can use an image gallery that works like that, or you could write it yourself basically modifying a "rollover"/mouseover image script to "onclick" (or the equivalent for a touchscreen device, which might still be onclick).

The solution to your problem is to run the script locally. This can possibly cause some problems in certain browsers and/or with certain code/features, but generally it should work fine. I recommend using Firefox because I've done that and it tends to work fine. (IE and Chrome are known to have some limitations, I believe.)
Assuming there's no reason you can't run it locally, this will be MUCH better because the images will take no time at all to transfer (you could still see a flicker, but not a pause/delay).