/    Sign up×
Community /Pin to ProfileBookmark

Have trouble with animated jpgs

Hi,

I have to create something with Javascript for a client. I created the following. It is supposed to be an animated jpg:

[url]http://www.voordeligewebsites.com/animatedjpg/[/url]

You’ll see nothing, but you can look at the source what I did. What you see, should work as described on this page:
[url]http://www.webdevelopersnotes.com/tips/html/animated_jpgs.php3[/url]

I tried to do it but I’m not good at html and javascript. Could somebody change this code for me in such a way that it works? And is it possible that you can add a time that says how long an image thould stay?

Thanks in advance for your help.

Frank

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@javaNoobieSep 22.2004 — Hm.. i thought only gifs and png support animation?
Copy linkTweet thisAlerts:
@Willy_DuittSep 22.2004 — Your problem lies here: var img_src = "a" + c + ".jpg";


Go back and read that tutorial again and note that their images are named: [b]a1.jpg, a2.jpg, ect[/b]

For simplicities sake, follow that naming convention or place your images into an array and modify the above line accordingly... I suggest that you change the image names...

.....Willy
Copy linkTweet thisAlerts:
@FangSep 22.2004 — You need an image to change. Put one in the body.

<img alt="myImage" name="ani" src="myImage.gif" height="100" width="300" />
Copy linkTweet thisAlerts:
@Frank1984authorSep 22.2004 — Wow guys, thanks, it works!

Check is out: http://www.voordeligewebsites.com/animatedjpg/

By the way, is there any way I can change the time an image is shown. So one image 1 second, an other 2 seconds.

Thanks again!
×

Success!

Help @Frank1984 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...