View Full Version : Floating image script
salt417
10-25-2005, 05:16 PM
DD floating image script
http://www.dynamicdrive.com/dynamicindex4/flyimage.htm
Great script! I love it. I have it working with the fading slideshow and it looks great.
One question... instead of the images being links can they be used to stop the script? onClick = something something? :)
jscheuer1
10-25-2005, 06:53 PM
Add this variable to moveobj.js near the top (addition red):
var vmin=2;
var vmax=5;
var vr=2;
var timer1;
var stop=0;
Add this to the movechip(chipname) function in moveobj.js (additions red):
function movechip(chipname){
if (document.getElementById){
if (stop){
document.getElementById(chipname).style.display='none'
return;
}
eval("chip="+chipname);
Use this for your image(s) in the html section on the page itself (from the example code, modify as needed, additions/changes red):
<div id="flyimage1" style="position:absolute; left: -500px; width:47; height:68;">
<a href="#" onclick="stop=1;return false;"><img src="test.gif" border=0></a></div>
salt417
10-25-2005, 08:41 PM
Hey, that's great. I'm at the dentist right now but I'll try it when I get home...
Thanx!
salt417
10-26-2005, 12:23 AM
Perfect! Thanx again.
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.