[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
www.dhtmlgoodies.com • View topic - can't seem to get arrows to stay on mouseout
Advertisement

can't seem to get arrows to stay on mouseout

Moderators: Calcifer, slothy

can't seem to get arrows to stay on mouseout

Postby onmyown » Thu Apr 06, 2006 5:58 pm

Don't know if it's this part of the code (attached below) but when I scroll over my right or left arrow, after about 2 seconds, my arrow image goes away and doesn't reappear.
Do I need to load a, 'arrow_right_over.gif?' I see it in the broken image (red x) but can't find it in the code.....
Thanks for the help.

function releaseSlide()
{
var id = this.id;
this.getElementsByTagName('IMG')[0].src = '/images/' + this.id + '.gif';
slideSpeed=0;
}

function gallerySlide()
{
if(slideSpeed!=0){
var leftPos = imageGalleryObj.offsetLeft;
leftPos = leftPos/1 + slideSpeed;
if(leftPos>maxGalleryXPos){
leftPos = maxGalleryXPos;
slideSpeed = 0;

}
if(leftPos<minGalleryXPos){
leftPos = minGalleryXPos;
slideSpeed=0;
}

imageGalleryObj.style.left = leftPos + 'px';
}
setTimeout('gallerySlide()',40);

}

function showImage()
{
if(activeImage){
activeImage.style.filter = 'alpha(opacity=50)';
activeImage.style.opacity = 0.5;
}
this.style.filter = 'alpha(opacity=100)';
this.style.opacity = 1;
activeImage = this;
}

function initSlideShow()
{
document.getElementById('arrow_left').onmousemove = startSlide;
document.getElementById('arrow_left').onmouseout = releaseSlide;
document.getElementById('arrow_right').onmousemove = startSlide;
document.getElementById('arrow_right').onmouseout = releaseSlide;
imageGalleryObj = document.getElementById('theImages');
imageGalleryLeftPos = imageGalleryObj.offsetLeft;
imageGalleryWidth = document.getElementById('galleryContainer').offsetWidth - 80;
maxGalleryXPos = imageGalleryObj.offsetLeft;
minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft;
var slideshowImages = imageGalleryObj.getElementsByTagName('IMG');
for(var no=0;no<slideshowImages.length;no++){
slideshowImages[no].onmouseover = showImage;
}
gallerySlide();
onmyown
 
Posts: 5
Joined: Thu Apr 06, 2006 5:46 pm

Postby Batalf » Tue Apr 18, 2006 9:46 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

can I post it privately or email it to you?

Postby onmyown » Tue Apr 18, 2006 10:13 pm

onmyown
 
Posts: 5
Joined: Thu Apr 06, 2006 5:46 pm

Postby Batalf » Tue Apr 18, 2006 10:18 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

sure, but just in case, here's the code

Postby onmyown » Tue Apr 18, 2006 10:21 pm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>
<head>
<title>2nd Test</title><link rel="stylesheet" type="text/css" href="website.css">

<style type="text/css">
#dhtmlgoodies_slideshow{
width:600px; /* Total width of slideshow */


}

#previewPane{
border:1px solid #CCCCCC;
margin-bottom:10px;
text-align:center;
vertical-align:middle;
padding-top:30px;

position:relative;

/* CSS HACK */
height: 432px; /* IE 5.x */
height/* */:/**/400px; /* Other browsers */
height: /**/400px;

}
#previewPane img{
line-height:400px;

}
#galleryContainer{

height:102px; /* Height of the images + 2 */
border:1px solid #CCCCCC;
position:relative;
overflow:hidden;
padding:1px;

/* CSS HACK */
height: 104px; /* IE 5.x - Added 2 pixels for border left and right */
height/* */:/**/102px; /* Other browsers */
height: /**/102px;

}
#arrow_left{
position:absolute;
left:0px;
z-index:10;
background-color: #FFF;
padding:1px;
}
#arrow_right{
position:absolute;
right:0px;
z-index:10;
background-color: #FFF;
padding:1px;
}
#theImages{
position:absolute;
height:100px;
left:40px;
width:100000px;

}
#theImages #slideEnd{
float:left;
}
#theImages img{
float:left;
padding:1px;
filter: alpha(opacity=50);
opacity: 0.5;
cursor:pointer;
border:0px;
}

#waitMessage{
display:none;
position:absolute;
left:200px;
top:150px;
background-color:#FFF;
border:3px double #000;
padding:4px;
color:#555;
font-size:0.9em;
font-family:arial;
}
</style>

<script type="text/javascript">
/***********************************************************************************************

Copyright (c) 2005 - Alf Magne Kalleland post@dhtmlgoodies.com

UPDATE LOG:

March, 10th, 2006 : Added support for a message while large image is loading

Get this and other scripts at www.dhtmlgoodies.com

You can use this script freely as long as this copyright message is kept intact.

***********************************************************************************************/
var displayWaitMessage=true; // Display a please wait message while images are loading?


var activeImage = false;
var imageGalleryLeftPos = false;
var imageGalleryWidth = false;
var imageGalleryObj = false;
var maxGalleryXPos = false;
var slideSpeed = 0;
function startSlide(e)
{
if(document.all)e = event;
var id = this.id;
this.getElementsByTagName('IMG')[0].src = 'images/' + this.id + '_over.gif';
if(this.id=='arrow_right'){
slideSpeed = -10;
}else{
slideSpeed = 10;
}

}

function releaseSlide()
{
var id = this.id;
this.getElementsByTagName('IMG')[0].src = '/images/' + this.id + '.gif';
slideSpeed=0;
}

function gallerySlide()
{
if(slideSpeed!=0){
var leftPos = imageGalleryObj.offsetLeft;
leftPos = leftPos/1 + slideSpeed;
if(leftPos>maxGalleryXPos){
leftPos = maxGalleryXPos;
slideSpeed = 0;

}
if(leftPos<minGalleryXPos){
leftPos = minGalleryXPos;
slideSpeed=0;
}

imageGalleryObj.style.left = leftPos + 'px';
}
setTimeout('gallerySlide()',40);

}

function showImage()
{
if(activeImage){
activeImage.style.filter = 'alpha(opacity=50)';
activeImage.style.opacity = 0.5;
}
this.style.filter = 'alpha(opacity=100)';
this.style.opacity = 1;
activeImage = this;
}

function initSlideShow()
{
document.getElementById('arrow_left').onmousemove = startSlide;
document.getElementById('arrow_left').onmouseout = releaseSlide;
document.getElementById('arrow_right').onmousemove = startSlide;
document.getElementById('arrow_right').onmouseout = releaseSlide;
imageGalleryObj = document.getElementById('theImages');
imageGalleryLeftPos = imageGalleryObj.offsetLeft;
imageGalleryWidth = document.getElementById('galleryContainer').offsetWidth - 80;
maxGalleryXPos = imageGalleryObj.offsetLeft;
minGalleryXPos = imageGalleryWidth - document.getElementById('slideEnd').offsetLeft;
var slideshowImages = imageGalleryObj.getElementsByTagName('IMG');
for(var no=0;no<slideshowImages.length;no++){
slideshowImages[no].onmouseover = showImage;
}
gallerySlide();
}

function showPreview(imagePath){
var subImages = document.getElementById('previewPane').getElementsByTagName('IMG');
if(subImages.length==0){
var img = document.createElement('IMG');
document.getElementById('previewPane').appendChild(img);
}else img = subImages[0];

if(displayWaitMessage){
document.getElementById('waitMessage').style.display='inline';
}
img.onload = hideWaitMessage;
img.src = imagePath;

}
function hideWaitMessage()
{
document.getElementById('waitMessage').style.display='none';

}
window.onload = initSlideShow;

</script>

</head>
<body>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<table width=20% border=0>
<tr>
<td valign=top>
<!--#include virtual="/includes/leftsidenav.txt"--></td>
<td width=80% border=0>
<div id="dhtmlgoodies_slideshow">
<div id="previewPane">
<img src="/photos/engagement.jpg">
<span id="waitMessage">Loading image. Please wait</span>
</div>
<div id="galleryContainer">
<div id="arrow_left"><img src="/images/arrow_l.gif"></div>
<div id="arrow_right"><img src="/images/arrow_r.gif"></div>
<div id="theImages">
<!-- Images used in the slideshow -->
<a href="#" onclick="showPreview('/photos/usmt.jpg');return false"><img src="/photos/usmt_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/psu_stadium.jpg');return false"><img src="/photos/psu_stadium_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/us_psulion.jpg');return false"><img src="/photos/psu_lion_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/us_wvwedding.jpg');return false"><img src="/photos/us_wvwedding_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/usmt.jpg');return false"><img src="/photos/usmt_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/wedding_cjim.jpg');return false"><img src="/photos/wedding_cjim_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/wedding_cpat.jpg');return false"><img src="/photos/wedding_cpat_sm.jpg"></a>
<a href="#" onclick="showPreview('/photos/wedding_sneil.jpg');return false"><img src="/photos/wedding_sneil_sm.jpg"></a>
<!-- End images used in the slideshow -->
<div id="slideEnd"></div>

</div>
</div>
</div>



</body>
</html>
onmyown
 
Posts: 5
Joined: Thu Apr 06, 2006 5:46 pm

Postby Batalf » Tue Apr 18, 2006 10:23 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Batalf » Tue Apr 18, 2006 10:32 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

Postby Batalf » Tue Apr 18, 2006 10:34 pm

Batalf
Site Admin
 
Posts: 2160
Joined: Sat Oct 22, 2005 9:38 pm

that's it

Postby onmyown » Tue Apr 18, 2006 10:44 pm

onmyown
 
Posts: 5
Joined: Thu Apr 06, 2006 5:46 pm


Return to Gallery script questions

Who is online

Users browsing this forum: No registered users and 1 guest

cron