Javascript and animated gifs
Does anyone know if it's possible to control an animated gif using JS? Let's say to control the number of frames to be played or to control which frame has to be displayed?
I don't think it is, but hey, you'll never know
thanx,
Shakespeare: onclick || !(onclick)
Megan posted this at 15:13 — 15th October 2002.
She has: 11,421 posts
Joined: Jun 1999
I've never heard of anything like that being possible and I would be surprised if it was. Sounds like a job for flash
The Webmistress posted this at 17:19 — 15th October 2002.
She has: 5,586 posts
Joined: Feb 2001
Hmmm, that was my thought about using flash. What exactly are you trying to do?
Jack Michaelson posted this at 19:48 — 15th October 2002.
He has: 1,733 posts
Joined: Dec 1999
I am trying to make a mouseover using an animated gif with 2 or 3 frames. Mouseout: display frame 1, Mouseover display frame 2 etc...
I know there are other, better ways to do this, but for this particular case this way is the best since the animated gifs already exist. The total number of anigifs is 1,500 or so and I don't feel like splitting them all manually into two or three different gifs...
But it seems like I have to :/
anyone else?
Shakespeare: onclick || !(onclick)
Busy posted this at 20:30 — 15th October 2002.
He has: 6,151 posts
Joined: May 2001
I remember someone made an animation using .jpg and javascript years ago. I'm not sure where it was now. I'll try my old bookmarks but I don't hold much hope of me keeping that one.
Jack Michaelson posted this at 07:38 — 16th October 2002.
He has: 1,733 posts
Joined: Dec 1999
Busy, you probably mean something like this:
http://www.wpdfd.com/wpdanim.htm
Altough it's an interessting site, it doesn't help me solving my problem
Thanx anyway. Anyone else?
Shakespeare: onclick || !(onclick)
TDS2599 posted this at 15:36 — 16th October 2002.
They have: 9 posts
Joined: Oct 2002
I believe if you use Adobe Image Ready, you can create a rollover with multiple frames, and specify which frame shows up on each action.
I will try it out and let you know if it works.
Tony
TDS2599 posted this at 15:49 — 16th October 2002.
They have: 9 posts
Joined: Oct 2002
Try this link...is this what you are trying to do?
http://www.coconutpalmz.com/test/logo.html
Over, Down, Click, Out
on the image
The Webmistress posted this at 15:50 — 16th October 2002.
She has: 5,586 posts
Joined: Feb 2001
Oooh, that's quite clever!
TDS2599 posted this at 15:51 — 16th October 2002.
They have: 9 posts
Joined: Oct 2002
I just saw the link you posted...
I guess I misunderstood...mine is a basic over, down, click and out...
I will see if I can do something with an animated gif...
ROB posted this at 16:38 — 16th October 2002.
They have: 447 posts
Joined: Oct 1999
i really doubt what youre trying to do is possible with javascript, although it's an excellent idea and it's a shame that it's not. it'd be nice to be able to keep all our rollovers as single images rather than seperate 'up' and 'over' images.
animated gifs animate, nothing you can do to stop that with js, an image is an image, a gif is a jpeg, as far as javascript is concerned. it may be possible with an applet, but probably not worth the effort.
dk01 posted this at 22:05 — 16th October 2002.
He has: 516 posts
Joined: Mar 2002
I have seen sites that show how to do animation with javascript. I bet if you modified their code you could load certain frames with a function. Guess it'd be a lot of work.
-dk
Jack Michaelson posted this at 07:27 — 17th October 2002.
He has: 1,733 posts
Joined: Dec 1999
Unfortunately that's what I was thinking too
If other solutions won't work, I might actually try it. I know some basic Java so I think it could work. Never thought of a Java solution for this one. Thanx!
Altough I appreciate your help, I'm not looking for a script that does animation (If I was, I would modify and use this one).
cheers,
Shakespeare: onclick || !(onclick)
jammin posted this at 21:45 — 17th October 2002.
They have: 222 posts
Joined: Sep 2002
it isnt that hard to split the gif files, especially when compared to figuring out an applet to do the stuff instead, and im pretty sure it is the only way you are going to get it to work like you want it to.
anyone can do any amount of work provided it isnt the work they are supposed to be doing.
Cog posted this at 17:12 — 19th October 2002.
They have: 24 posts
Joined: Feb 2002
I haven't read te whole thread but maby simple javascript function could do the trick?
Just make a function that takes image as the first variable and timer as the next.
onMouse="funcChangeImage('img1',0); funcChangeImage('img1',1000); "
onMouseOut="funcChangeImage('img1',0)"
Jack Michaelson posted this at 11:56 — 20th October 2002.
He has: 1,733 posts
Joined: Dec 1999
Hmmm... that could actually work. I'll try it tomorrow when I'm back @ work.
Thanx!
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.