Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Fade in or out effect

Status
Not open for further replies.

isilkin

Technical User
Feb 12, 2008
27
0
0
US
Guys can anyone tell me what is wrong with this a basic fade in or out effect in javascrtipt. That is what I have but it doesn't do anything. I want images to fade out as next image loads for my slideshow.

function autoChangeHandler() {

imageTimerId = setInterval("processNext()", 2000);
document.getElementById("bigPic").style.filter="blendTrans(duration=2)";
document.getElementById("bigPic").filters.blendTrans.apply();
document.getElementById("bigPic").filters.blendTrans.play();
}

processNext() is just a function that gets the next image in the array.
 
You are absolutely right! it only works in IE. So I guess a logical question to ask is there a universal transition method for all browsers. I think I know of one way it would deal with reducing the opacity of an image gradually, but this will only give me a fade out effect. But what if I want to swithc it to a disolve effect without rewriting this whole code?
 
If you want to transition between two images cross-browser, you need 2 fades - one to fade in, and one to fade out, at the same time.

It's not too hard, so shout if you get stuck.

Hope this helps,
Dan



Coedit Limited - Delivering standards compliant, accessible web solutions

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Please help me how to call a transition page from vb application.

I have a vb application which has a timer control to display 2 web pages. I would like to have a transition page which can have fading effect and also displaying error messages if there is a problem displaying the 2 web pages. In my code, I have a line as following:
myUrl = New Uri(" + "
But if I run the application I get "run time error". Can someone give me some ideas how to fix this problem? Thanks in advance for your help.

Jen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top