UK Webmaster Talk - Online Marketing - SEO


 

Fading Images

This is a discussion on Fading Images within the Website Design Articles forums, part of the Webmaster Articles/Tutorials category; Have you ever saw these images where you put the mouse on them and the opicity of a coloured layer ...


Go Back   UK Webmaster Talk - Online Marketing - SEO > Webmaster Articles > Webmaster Articles/Tutorials > Website Design Articles

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices

Reply

 

LinkBack Thread Tools Display Modes
Old 09-04-2005, 11:45   #1 (permalink)
WMT Addict
 
Join Date: Apr 2005
Location: Brighton,UK
Posts: 162
iTrader: 0 / 0%
asgsoft is on a distinguished road
Default Fading Images

Have you ever saw these images where you put the mouse on them and the opicity of a coloured layer decreases and then when you put the mouse of it it goes back to the semi-hedden picture. here is how to do it. for a working example of it go to www.greycobra.com and have a look at the random tutorial pictures at the top.
open up your website and in the head tag insert the following
PHP Code:
<SCRIPT language=JavaScript>
<!--
nereidFadeObjects = new Object();
nereidFadeTimers = new Object();
function 
nereidFade(objectdestOpratedelta){
if (!
document.all)
return
if (
object != "[object]"){ 
setTimeout("nereidFade("+object+","+destOp+","+rate+","+delta+")",0);
return;
}

clearTimeout(nereidFadeTimers[object.sourceIndex]);

diff destOp-object.filters.alpha.opacity;
direction 1;
if (
object.filters.alpha.opacity destOp){
direction = -1;
}
delta=Math.min(direction*diff,delta);
object.filters.alpha.opacity+=direction*delta;
if (
object.filters.alpha.opacity != destOp){
nereidFadeObjects[object.sourceIndex]=object;
nereidFadeTimers[object.sourceIndex]=setTimeout("nereidFade(nereidFadeObjects["+object.sourceIndex+"],"+destOp+","+rate+","+delta+")",rate);
}
}
//-->
</SCRIPT> 
[html]
<body>
<img src=yourimage.gif width="282" height="25" border=0 style=filter:alpha(opacity=20) onMouseOver=nereidFade(this,100,20,10) onMouseOut=nereidFade(this,20,5,5)>
[html]

All you have to do is change the image name and what the starting colour overlay and opicity percentage as in photoshop.
I am sorry only works on IE as far as i know.
If in any dought please do not hesistate to contact me.
asgsoft is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2005, 13:14   #2 (permalink)
WMT Addict
 
Join Date: Apr 2005
Location: Singapore
Posts: 238
iTrader: 0 / 0%
Aaron has a spectacular aura about
Send a message via ICQ to Aaron Send a message via AIM to Aaron Send a message via MSN to Aaron Send a message via Yahoo to Aaron
Default

How can this be integrated into PHP-Nuke?
Aaron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2005, 13:51   #3 (permalink)
WMT Addict
 
Join Date: Apr 2005
Location: Brighton,UK
Posts: 162
iTrader: 0 / 0%
asgsoft is on a distinguished road
Default

i am very sorry i can't help you with this as i have no experiance with php nuke atall sorry again
asgsoft is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 09-04-2005, 13:52   #4 (permalink)
Moderator
 
Join Date: Mar 2005
Location: Barnsley, UK
Posts: 1,001
iTrader: 0 / 0%
Wistow has a reputation beyond reputeWistow has a reputation beyond reputeWistow has a reputation beyond reputeWistow has a reputation beyond reputeWistow has a reputation beyond reputeWistow has a reputation beyond repute
Default

Just integrate it into the page where you want it

Craig
Wistow is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 15-04-2005, 13:15   #5 (permalink)
Newbie
 
Join Date: Apr 2005
Posts: 8
iTrader: 0 / 0%
nin3 is on a distinguished road
Default

Nice Effect. I've been looking for something like this.
nin3 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16-04-2005, 11:35   #6 (permalink)
Newbie
 
Join Date: Apr 2005
Posts: 13
iTrader: 0 / 0%
Zaltan will become famous soon enough
Default

Could you please evaluate a little more into what the "nereidFade..." series of functions do and how they are used? I am just in a "learning" JavaScript stage, and the use of every new function makes me curious about it.

Thanks.
Zaltan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16-04-2005, 11:39   #7 (permalink)
WMT Addict
 
Join Date: Apr 2005
Location: Singapore
Posts: 238
iTrader: 0 / 0%
Aaron has a spectacular aura about
Send a message via ICQ to Aaron Send a message via AIM to Aaron Send a message via MSN to Aaron Send a message via Yahoo to Aaron
Default

Quote:
Originally Posted by Wistow
Just integrate it into the page where you want it

Craig
I know, but I don't know how.
Aaron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16-04-2005, 11:45   #8 (permalink)
Newbie
 
Join Date: Apr 2005
Posts: 13
iTrader: 0 / 0%
Zaltan will become famous soon enough
Default

Well the (long-term) simple answer would be to learn HTML. :p

Otherwise, just put that entire first block of code within the <head> and </head> tags of your page, and then put the following script wherever you'd like the image to appear, replacing "YOURIMAGE.GIF" with the location of an image:
HTML Code:
<img src="YOURIMAGE.GIF" width="282" height="25" border="0" style="filter:alpha(opacity=20)" onMouseOver="nereidFade(this,100,20,10)" onMouseOut="nereidFade(this,20,5,5)"> 
And I think you can change the width and height attributes too, not sure.


Also note that this will only work for users who are using the Internet Explorer browser.
Zaltan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16-04-2005, 11:51   #9 (permalink)
WMT Addict
 
Join Date: Apr 2005
Location: Singapore
Posts: 238
iTrader: 0 / 0%
Aaron has a spectacular aura about
Send a message via ICQ to Aaron Send a message via AIM to Aaron Send a message via MSN to Aaron Send a message via Yahoo to Aaron
Default

Quote:
Originally Posted by Zaltan
Well the (long-term) simple answer would be to learn HTML. :p

Otherwise, just put that entire first block of code within the <head> and </head> tags of your page, and then put the following script wherever you'd like the image to appear, replacing "YOURIMAGE.GIF" with the location of an image:
HTML Code:
<img src="YOURIMAGE.GIF" width="282" height="25" border="0" style="filter:alpha(opacity=20)" onMouseOver="nereidFade(this,100,20,10)" onMouseOut="nereidFade(this,20,5,5)"> 
And I think you can change the width and height attributes too, not sure.


Also note that this will only work for users who are using the Internet Explorer browser.
I don't use HTML anymore.
Aaron is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 16-04-2005, 14:47   #10 (permalink)
Tim
Cool Newbie
 
Join Date: Apr 2005
Posts: 32
iTrader: 0 / 0%
Tim is just really nice
Default

Quote:
Originally Posted by Aaron
I don't use HTML anymore.
If you're not using HTML, how are you making webpages? :?
Tim is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
fading, images

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Fading colours??? Lewis Website Design Forum 2 27-06-2005 05:26
Fading Links asgsoft Website Design Articles 5 14-06-2005 17:50
Expanding Images Aaron Programming Articles 0 23-04-2005 21:53
HTML Images Bmg Programming Articles 0 07-04-2005 16:24


All times are GMT +1. The time now is 18:00.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
UK Webmaster Forum © WebmasterTalk.co.uk | Design by Forbairt

Ad Management by RedTyger

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41