Click to See Complete Forum and Search --> : Mirror image water effect


chewy
07-23-2005, 09:23 AM
On Javascript years ago I found a code to do a mirror effect with an image and it had a water effect. I can't find my papers and have looked for days and can't find the code. Can anyone help me please??
:confused:
Thanks

Alon C.
07-23-2005, 09:50 AM
Hi, I think it was a JAVA Applet and not JVS.

Anyway, look at this one: http://www.anfyteam.com/anj/water/anwater.html

chewy
07-23-2005, 09:58 AM
Thanks Alon,
That isn't really what I am looking for, but I do like it. I love messing with my images. What I am looking for is where I can take my image and have it upside down attached to the first image. Like a lake reflection. Then the bottom one (reversed image) has a ripple effect like moving water. I know I got it here once, but can't find it. I like what you did and might use it too to play.. lol
Thanks again,
Jackie

Alon C.
07-25-2005, 07:47 AM
Thanks Alon,
That isn't really what I am looking for, but I do like it. I love messing with my images. ....

Well, If you love messing with your images, hereby a JVS using two images with flip-flop effect.
(BTW,Its the first one I can think of.. ) But you can manipulate it by adding more code reaching water-effect or other cute effects.. (read the remarks inside the code first)
Anyway, this old world just keeps on spinning. And I'm getting dizzy.... :cool:


<HTML>
<HEAD>
<TITLE>Image_FlipFlop</TITLE>
<SCRIPT language="JavaScript" type="text/javascript">
<!--
var wdmax=120; //set maximum width of square image (px)
var wdmin=0; //set minimum thickness of edge-on image (px)
var inc=5; //set step change in px (wdmax-wdmin must be a multiple) These two variables
var rate = 50; //pause between steps (in millisec) determine flip-flop speed
var pause = 1000; //pause between flip and flop (in millisec)
var ff="flip"; //initialise whether movement starts with a "flip" (sideways) or "flop" (vertical) change.

function flipflop() {
if (ff=="flip") {
var wd = document.getElementById("pic").getAttribute("width");
wd = wd - inc;
document.getElementById("pic").setAttribute("width",wd);
if (wd==wdmin) {
document.getElementById("pic").setAttribute("src","Your_2nd.jpg"); //substitute name of your second picture
inc=-inc;
}
if (wd==wdmax) {
ff="flop";
inc=-inc;
setTimeout("flipflop()",pause);
}
else {
setTimeout("flipflop()",rate);
}
}
else {
var ht = document.getElementById("pic").getAttribute("height");
ht = ht - inc;
document.getElementById("pic").setAttribute("height",ht);
if (ht==wdmin) {
document.getElementById("pic").setAttribute("src","Your_1st.jpg"); //substitute name of your first picture
inc=-inc;
}
if (ht==wdmax) {
ff="flip";
inc=-inc;
setTimeout("flipflop()",pause);
}
else {
setTimeout("flipflop()",rate);
}
}
}
//-->
</SCRIPT>
</HEAD>
<BODY onLoad="javascript:flipflop()">
<center>
<TABLE border="0">
<th width="160" height="160">
<a href="#" target=""><img src="Your_1st.jpg" width="100" border=0 height="100" alt="" style="position:absolute;left:550;top:1" ID="pic"></a>
</th></TABLE>
</center>
</BODY>
</HTML>

ccoder
07-25-2005, 07:50 AM
Try Googleing for lake.java or lake.class. It sounds like that is what you are looking for.

chewy
07-25-2005, 08:21 AM
Thanks everyone. I will try these. I downloaded Anfy and am playing with that now. I'd like to find something that I can save as a gif. image. I also have Water Illusion Studio which is fun to play with and Gif Constrution Pro. But the Gif Constrution Pro hasn't got all the stuff I like to mess with. The others that I like to work with I can't save as a gif. I'll have to try to find the Gooleing you mentioned too.
Thanks for all the help and keep it coming. I never get tired of trying new things.
Jackie :D