Click to See Complete Forum and Search --> : Desperate... need help ASAP with imagemap image-flips!
Reyngel
01-13-2003, 12:42 PM
I have an urgent problem that I hope someone can help me with. I'm trying to create an imagemap that has image flips on it, as shown on HTML Goodies.com. The code that's on that site is as follows:
function zoomin() {
document.emp.src = Image3.src; return true;
}
function zoomout() {
document.emp.src = Image2.src; return true;
}
function original() {
document.emp.src = Image1.src; return true;
}
// - stop hiding -->
</SCRIPT>
...what I don't understand is the whole zoomin/zoomout part. The code provided seems to be for three parts... two hotspots, and the return-to-true image. But what if I have four parts, meaning, what if i have three hotspots, plus the original image? zoomin, zoomout, original... seems like there can't be any more associations, unless i'm totally missing something.
Help ASAP would be much appreciated! If not here, then my email is bnlraine@hotmail.com.
thanks!
khalidali63
01-13-2003, 12:50 PM
If I understand you correctly
you can have multiple parts.the zoomin and zoomout and the originaly just point to a series of actions that will be triggered in an invocation of an event by user.
You need to put a logic together that what event will trigger which function.
e.g
mouseover = zoomout
mousedown = newmethod
mouseup = anothermethod
mouset = zoomin;original
Is that what you were asking?
Reyngel
01-13-2003, 12:50 PM
hmm, i had a thought... are the zoomin, zoomout, and original, ....are they just the "names" of the images? i read that "original" has to be maintained... so does that imply that the webauthor just decided to name the first image "zoomin," and the second one "zoomout?" cause that might make sense then... however, that's very confusing, especially since the word zoomout makes you think of zooming out, when in actuality, the image it represents, assuming i'm right, is actually a zoomin, and should probably be called "zoomin2" or something.
any help?
Reyngel
01-13-2003, 12:55 PM
Originally posted by khalidali63
If I understand you correctly
you can have multiple parts.the zoomin and zoomout and the originaly just point to a series of actions that will be triggered in an invocation of an event by user.
You need to put a logic together that what event will trigger which function.
e.g
mouseover = zoomout
mousedown = newmethod
mouseup = anothermethod
mouset = zoomin;original
Is that what you were asking?
hmm... i don't know if that answers my question, cause i'm kinda confused about what you said, but i'll try to reword my question....
here's the link from where i'm getting the tutorial:
http://www.htmlgoodies.com/tutors/imagemapmouse.html
ok, so basically, i've created the image map. on the image map, i have three parts, or hotspots, that when a mouseover occurs, the whole imagemap flips to a set image. just like what's on that link. in the coding he provided, however, it seems like he associated the static, orginal image of all the men sitting there, to be...
function original() {
document.emp.src = Image1.src; return true;
}
and he associated the closeup of lincoln to be the one above that, and the closeup of the other guy to be the one above the lincoln close-up code. am i making sense?
so... i'm confused, cause what if i have 3 hotspots?? one would be zoomin, one would be zoomout, the original would be original, but what about the 3rd hotspot?
khalidali63
01-13-2003, 12:57 PM
zoomin,zoomout and original are just function names.that perform a particular task, in the case of example above they
just displau a certain image whenever they are called by any event.
you can change there name to n e thing you want as long as they are renamed in teh HTML portion of the code from where they are called.
Reyngel
01-13-2003, 01:01 PM
Originally posted by khalidali63
zoomin,zoomout and original are just function names.that perform a particular task, in the case of example above they
just displau a certain image whenever they are called by any event.
you can change there name to n e thing you want as long as they are renamed in teh HTML portion of the code from where they are called.
ok... so, then i think what i suspected is true. so, i can change the names of zoomin and zoomout, cause they're just names of the functions, rather than the functions themselves.... correct? thus, i could have zoomblabla be the name for my 3rd function?
if that's the case, you can see how i was so confused... since zoomin and zoomout sounds like coding, rather than names... hehe.
Reyngel
01-13-2003, 01:22 PM
oh, i forgot to say thank you! :)