| | I need the best way to do a blendTrans filter, BUT IT HAS TO BE INCORPERATED INTO ONMOUSEOVER. I'd aprictiate it. |
|
CODE // rollover functions if (document.images) { imagearray = new Array(); imagearray[0] = "images/nav1.gif"; imagearray[1] = "images/nav1on.gif"; inum = new Array(); for (i=0; i<imagearray.length; i++) { inum[i] = new Image(); inum[i].src = imagearray[i]; } } function imgchange (imgName, imagenum) { if (document.images) { if (navigator.appName.indexOf("Microsoft Internet Explorer") { // Internet Explorer document[imgName].filters(0).apply(); document[imgName].src = inum[imagenum].src; document[imgName].filters(0).play(); } else { // Other browsers that don't support it document[imgName].src = inum[imagenum].src; } } } Next, you need to put this in the <style> tag: CODE img { filter: blendTrans(duration=1.0); } This contains the code that powers the rollover. Now to apply it: CODE <a href="" onmouseover="imgchange('nav1',1)" onmouseout="imgchange('nav1',0)"> <img name="nav1" src="images/nav1.gif" width="130" height="20" alt="" border="0" /> </a> Let me briefly explain the imgchange function... function imgchange ( image_name, array_index[I]); This is put in the onmouseover and onmouseout statements. The [I]image_name refers the the <img name="value" /> reference, and the array_index refers the the image in the array index value. Example: changeimg('name',0) would refer to imagearray[0]. make sure that you have placed a name="value" in the image tag, and that the changeimg(name,5) in the onmouseover and onmouseout match this. To add more images... To add more images, you simply need to put another imagearray[next_number] = "images/nav3on.gif"; in the script tag, where next_number equals the next array number. Ok? Then add another <a href="#link" onmouseover="changeimg(...)" onmouseout="changeimg(...)"><img src="" name="next_img" /></a> in the body where you want it. Hope you all can figure this out. NOTE: The reason why we test and see if the browser is IE is because this only works in Internet Explorer. Other browsers will just see a standard rollover; If you want to change the duration of the effect, change the duration length (its in seconds.)
Recent Queries:-
Keywords : blendtrans, filter, onmouseover, code
(0) Hi There! .... (3) could some one help with this code. I have been working on this for the past hour trying to get it (8) I want to create my own e-mail form for my site and I don't quite know if JavaScript or PHP is Html Help With Php Codebox (8) I'm trying to make codebox for my guestbook so that users can post PHP code inside.. I tried Whats the code for tranparent pictures (4) I dont want just transparent pictures i want a sort of rollover image. I see this done on myspace a (4) So i usually work in notepad, or frontpage but i was using dreamweaver instead because i wanted to haha (4) very useful /biggrin.gif" style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I need a code to help out here please... (6) Hey everyone.. I was just wondering if there was a code/script that I could insert into my html very useful (9) how do you do if you want to put a video or audio file on you page...maybe you will use CODE (8) My question is, why would anyone use the CODE tag when you can use the PRE tag? 1. The PRE tag What's the code (5) Alright, I'm making a website for a band. And he requested on the "Media" page that when you go in hmtl or PHP (7) Hey guys. I'm doing a web-based (running on an intranet) Inventory System for my final (2) I've been doing a lot of java stuff recently and some is pretty neat, so I'd like to put it html help needed (6) Hey, can anyone help me generate the code needed for a table that would look something like this? (3) Does anyone know how to have Dreamweaver MX (or some other program) tally up the lines of code in an - want some cool effect for your website? (1) ok, this code isn't supported by some browsers, like Firefox. But it still works for the anyone know the html code to make flash w3c compliant? (0) Recently, I decided to make my entire site W3C compliant . That didn't work too well (or else - I need a good code (2) you know where you can use your own images for a list. well, I have a code that don't work. (8) Can someone give me the code which redirects you automatically in the whole page instead of only in CODE (2) i find this code :: CODE BODY { SCROLLBAR-FACE-COLOR: #ffffff; SCROLLBAR-HIGHLIGHT-COLOR: History -1 (7) What's the code I use on a link to go back to previous page?.... Javascript / Html code to disable them (6) hi, i would like to know how the scrollbars, menubars etc.. can be disabled. I hope someone can help www.bpsite.tk (32) Whats you fav code?.... Help!! (4) I'm a total moron of html... and i wish i know how to: 1. Change the visitor mouse cursor while (3) What is invalid in this CSS that hinders it to show up the edge effect (ripped papper like on left & Looking for blendtrans, filter, onmouseover, code
|
![]() Blendtrans Filter With Onmouseover? - anybody got a good code? |