Virtual Mechanics: Community Forums and FAQs
Virtual Mechanics: Community Forums and FAQs
Animation / Mobile
Help with code ?|
Go
![]() |
New
![]() |
Find
![]() |
Notify
![]() |
Tools
![]() |
Reply
![]() |
|
|
Working Mechanic |
Okay, I want to add this, is it possible?
<script language="JavaScript1.2">
//Gradual-Highlight image script- By Dynamic Drive
//For full source code and more DHTML scripts, visit http://www.dynamicdrive.com
//This credit MUST stay intact for use
function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}
</script>
then it says to add this after the link.
style="filter:alpha(opacity=30);-moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)"How do i do this on my pages? What I want is to dull the images but I dont want to have to create 70 new objects to place over this to do the mouseover...does that make sense? |
||
|
Guru 'Power' Mechanic![]() |
It makes perfect sense. Too bad I don't have a pefect answer
Include the main block of code in the header of your page(s). Details here. Include this as a one-line 'Code Object' on your page: <a href="whatever.htm"><img src="mygif.gif" border=0 style="filter:alpha(opacity=30); -moz-opacity:0.3" onMouseover="high(this)" onMouseout="low(this)"></a> That is a direct copy of the example on the Dynamic Drive site. whatever.htm = page name you are linking to; e.g. page2.html mygif.gif = name of your button image - you may decide something like myimages/mygif.gif if your images are in their own folder. I gave this a test and it worked for me. However, rather than that last code object, I would much prefer to use a regular SiteSpinner image, with a special link. I have had no luck with that so far. Someone else may have ideas... This message has been edited. Last edited by: Bruceee, |
|||
|
|
Working Mechanic |
Okay, I have ditched this code, I keep getting an error, so...now.
I take a large image, 1024x768, pull the corner down and make it pop up, okay. Then, I copy the image and change the transparencies and place it over the other image with the mouse effect to disappear when the mouse moves over it. Works once, the box to only do it once is not checked, then I get an error on the preview page and it doesnt work anymore. Please tell me, its just the preview...or is this a common problem. I spent all this time doing this, now, I deleted it, because of the error. This program, although I love it, frustrates me to no end at times, I tell you. Now, I went back and deleted them and redid them all. Have a few more things to add, then I will upload and let you know if this worked or not. If it dont, I shall return. |
|||
|
VM Staff![]() |
I just tried that and it worked correctly. I assume you are using the version (2.5f). If you still have a problem, let us know. Also tell us what the error message you see says.
|
|||
|
|
Working Mechanic |
I got it harpo, deleted old items and finally got it working. Whew!! It looks awesome.
here is the page its page two of the brushes www.greenleafladysworld.com/Razzle.html For some reason I think it had to do with that new update from windows and the pop up blocker they have installed. It kept blocking my preview and not letting the mouse over work saying it was an activex control or something. I tried to, but I can't seem to turn that off. Anyhoo, its working now. Not touching it. LOL! |
|||
|
VM Staff![]() |
Impressive!
One note: you might want to widen the text box that contains "Textures & Brushes" a little. If someone doesn't have the particular font you used another font will be substituted and if it is slightly wider it may cause the words to wrap to a new line. Here is what I see: |
|||
|
Guru 'Power' Mechanic![]() |
I see much the same as Harpo, except that my small font is different. If you haven't done so already, consider using web-safe fonts for your text objects. More details here.
Ok, I'll say it -- the emperor has no clothes I don't see any mouseover effects. Some of the links to the images look to be still pointing to folders on your local disk. Also, the usual Javascript that SiteSpinner generates for mouseovers seems to be missing -- unless you have been devilishly cunning and hidden it somehow Other that that, the page looks great |
|||
|
|
Working Mechanic |
Geez, will fix that font tomorrow Harpo! Thanks!
Bruceee the mouse over are on page two of the brushes. There are pictures over top of other pictures. It works for me, please check again or I will need to fix it. BAH! |
|||
|
Guru 'Power' Mechanic![]() |
Sorry, I was looking in the wrong place -- should have read your earlier post more carefully.
The emperor does have clothes and very nice they are too. Translation: the mouseovers on page two work for me too |
|||
|
| Powered by Eve Community |
| Please Wait. Your request is being processed... |
|

