I don't really get this flipping thing:
<SCRIPT LANGUAGE="JavaScript">
<!-- hide from none JavaScript Browsers
Image1= new Image(75,50)
Image1.src = "goof3.gif"
Image2 = new Image(75,50)
Image2.src = "goof4.gif"
function SwapOut() {
document.imageflip.src = Image2.src; return true;
}
function SwapBack() {
document.imageflip.src = Image1.src; return true;
}
// - stop hiding -->
</SCRIPT>
I mean this part:
Image1= new Image(75,50)
Image1.src = "goof3.gif"
Image2 = new Image(75,50)
Image2.src = "goof4.gif"
Are we supposed to put our image URLs where the "goof"s are or something?
Another thing, it would be easier if you resize and optimize your image to be 75 X 50 before using them because this code will resize your image which could be larger than it need to be making it load slower. It may also distort your image if it's not presized correctly. Just something else to consider.
I got the first one workin', but when I try to get another button on the page, I change to name of the Flip and I get problems with the buttons! O.o
I get the same...only its always the last image rollover that works, but when I hover over any of the others they only affect the last one I've put on there.
Here is the script I have been using:
<!--webbot bot="HTMLMarkup" startspan --><body><SCRIPT LANGUAGE="JavaScript">
<!-- hide from none JavaScript Browsers
Image1= new Image(150,30)
Image1.src = "home_01.jpg"
Image2 = new Image(150,30)
Image2.src = "home_01-over.jpg"
function SwapOut() {
document.imageflip1.src = Image1.src; return true;
}
function SwapBack() {
document.imageflip1.src = Image2.src; return true;
}
Bookmarks