What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » mouse over to change image - link

Pages: (2): « First [ 1 ] 2 » Last »
mouse over to change image - link
Author: Message:
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. mouse over to change image - link
i have to create an image for a link that when you mouse over it, it fades into another image.

the two images are the same just one is a silhouette and the other is the colour version.
i would like it to be the black silhouetter version then to fade through to the colour version when the link is moused over.

i thought about using Flash, but im not sure how to encorprate it. if anyone can give me tips/tuts/help i would be much appreciated.
thanks.
"You don't sleep, you defragment!"
05-14-2006 11:18 PM
Profile E-Mail PM Web Find Quote Report
Supersonicdarky
Veteran Member
*****

Avatar

Posts: 2317
Reputation: 48
– / – / Flag
Joined: Feb 2005
Status: Away
RE: mouse over to change image - link
http://academ.hvcc.edu/~kantopet/old/javascript/i...parent=basic+dhtml

not sure about fading though
05-14-2006 11:21 PM
Profile E-Mail PM Find Quote Report
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. RE: mouse over to change image - link
thanks. though it is important that it fades slowly. say over the time of 2 or 3 seconds.
"You don't sleep, you defragment!"
05-14-2006 11:24 PM
Profile E-Mail PM Web Find Quote Report
Supersonicdarky
Veteran Member
*****

Avatar

Posts: 2317
Reputation: 48
– / – / Flag
Joined: Feb 2005
Status: Away
RE: mouse over to change image - link
found it :D

http://javascript.internet.com/navigation/fading-rollover.html
05-14-2006 11:25 PM
Profile E-Mail PM Find Quote Report
DJKAL
Senior Member
****

Avatar

Posts: 800
Reputation: 14
33 / Male / –
Joined: Oct 2005
O.P. RE: mouse over to change image - link
it didnt work :<
it wasnt the way i thought it was.

is there any way i can use flash to do it?
"You don't sleep, you defragment!"
05-14-2006 11:55 PM
Profile E-Mail PM Web Find Quote Report
vaccination
Veteran Member
*****

Avatar

Posts: 2513
Reputation: 43
32 / Male / –
Joined: Apr 2005
RE: mouse over to change image - link
i no you can make 2 images fade into each, taking as long as you like,  other in flash but im not sure about the actionscript.... i will try to find out for you
[Image: jumbled.png]
05-15-2006 03:58 PM
Profile PM Find Quote Report
t1a0s
Full Member
***

Avatar

Posts: 107
Reputation: 3
33 / Male / Flag
Joined: Oct 2004
RE: mouse over to change image - link
If I remember rightly, the best way to do that in flash is by using a movie clip as a button. I came across a useful tutorial on how to do it before, I'll try and dig it up.

Member since 7125 days, 9 hours, 5 minutes, 38 seconds ago.
05-15-2006 04:43 PM
Profile E-Mail PM Find Quote Report
vaccination
Veteran Member
*****

Avatar

Posts: 2513
Reputation: 43
32 / Male / –
Joined: Apr 2005
RE: mouse over to change image - link
ahh i remember now you have to create a image ... convert it to a button then once inside the button use the special timeline to make the button change when it is moused over all you have to do is put the second image in the area for the mouse over.... ergh if only my flash was working i would create a screenshot!

Its kinda hard to explain without pictures but i tried sorry if it doesnt help, mayb have a playaround and see if you can work it out!

EDIT: found a site which should help you out

http://www.echoecho.com/flashbuttons01.htm


This post was edited on 05-15-2006 at 05:17 PM by vaccination.
[Image: jumbled.png]
05-15-2006 05:14 PM
Profile PM Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
Joined: Dec 2002
Status: Away
RE: mouse over to change image - link
http://www.mandarindesign.com/fadejs.html

I will edit this when I get home for actually mouse over fading.
05-15-2006 05:45 PM
Profile E-Mail PM Find Quote Report
Matti
Elite Member
*****

Avatar
Script Developer and Helper

Posts: 1646
Reputation: 39
31 / Male / Flag
Joined: Apr 2004
RE: mouse over to change image - link
I've written this special for you. :)

This is a simple JavaScript which uses Microsoft's blendTrans-filter to fade in and out on mouseover. Because it uses Microsoft filters, it'll only work in Internet Explorer. It works with a function fade() which accept one parameter containing the new URL for the image.

Here it comes!

Place this in the <HEAD> of your webpage:
code:
<script language=javascript>
//Browser check: the effects will only work on MSIE 5.5 or higher!
var detect = navigator.userAgent.toLowerCase(); //Get the browser information string
var ie = detect.indexOf("msie") + 1; //See if it's IE
var fullVersion = parseFloat(detect.substring(ie+4,detect.length)); //Retrieve the version number after 'MSIE '
if (ie && fullVersion >= 5.5) {
    var useFilters = true; //Ok, we're running on IE 5.5 or higher!
} else {
    var useFilters = false; //Nope, we can't use filters here...
}

var fadeduration = 0.5; //The duration of the fade in seconds.

//The fade function
function fade(img) {
    if(useFilters) { //Can we use the filters?
        document.images.fading_btn.style.filter="blendTrans(duration=" + fadeduration + ")"; //Fade duration
        //We have to check if the filter is still playing, otherwise this will give a wrong effect.
        if (document.images.fading_btn.filters.blendTrans.status != 1) {
            document.images.fading_btn.filters.blendTrans.Apply(); //Applying the filter
            document.images.fading_btn.src = img; //Setting the image
            document.images.fading_btn.filters.blendTrans.Play() //Playing the fade effect
        }
    } else {
        //Nope, we'll have to drop the fading effect and only change the src of the image.
            document.images.fading_btn.src = img;
    }
}
</script>
This is how you should use it on your button:
code:
<img src="btn0.jpg" width=150 height=30 name="fading_btn" onmouseover="javascript:fade('btn1.jpg')" onmouseout="javascript:fade('btn0.jpg')" border=0>
The only restriction is that it will only work in Internet Explorer 5.5 or higher. It's good to use this since 80% of the internet users are using IE 5.5+, but you can use a Flash animation as replacement if you want.

It's your choice! ;)
Plus! Script Developer | Plus! Beta Tester | Creator of Countdown Live | Co-developer of Screenshot Sender 5

Found my post useful? Rate me!
05-15-2006 06:24 PM
Profile E-Mail PM Web Find Quote Report
Pages: (2): « First [ 1 ] 2 » Last »
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On