How do I import a transparent gif as a hover button component? (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


jasonbach -> How do I import a transparent gif as a hover button component? (4/3/2001 13:16:00)

I have been trying to use the hover button component feature in Frontpage 2K. I have made 2 versions of my buttons as transparent gif files in photoshop, and yes I did export them the right way. Only, when I specify under the properties for the hover button the right gifs, then go to the preview or the live version, the background of the gif is not transparent, just all white and ugly, creating a huge block.
Any ideas why this would be happening? Thanks!




LB -> RE: How do I import a transparent gif as a hover button component? (4/3/2001 15:41:00)

Hi, Jason -

I'm going to move this thread to Beginners. You should get some quick help over there.

Linda

------------------
Ruby Marketing





cecilc -> RE: How do I import a transparent gif as a hover button component? (4/3/2001 17:04:00)

Hey, Jason...

My first advice to rid yourself of the hover buttons out of FP. They are, at their best, unpredictable....and, at their worst, will cause browser crashes. Plus they're just ugly - while they load, they leave that ugly gray square on the screen - who wants that???? Get rid of 'em!!

There are scripts out and about the net that will work much, much better than the hover buttons out of FP. Try ANYTHING else than those hover buttons!

Cecil

------------------
cecil@awesomehouse.com





jasonbach -> RE: How do I import a transparent gif as a hover button component? (4/3/2001 18:08:00)

Well, I took the advice of some other postings and used the mighty mouseover machine to create a test button. Now it works a lot better, especially with the transparent gifs. On the preview, however, I roll over with the mouse, and it changes into a transparent outline with a small red x in the upper left hand corner, probably signifying that it can not find the image1on.src file. I triple checked the file name and path, and I think I'm going crazy.

Here is my code, very basic right now. Can anybody look at it and see if they see anything wrong with it? I appreciate it a lot!!!!

<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>

<script language="JavaScript">
<!--

if (document.images) {
image1on = new Image();
image1on.src = "D:\Temp\FlashTyper\HomeButtonB.GIF";

image1off = new Image();
image1off.src = "D:\Temp\FlashTyper\HomeButtonA.GIF";

}

function changeImages() {
if (document.images) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src = eval(changeImages.arguments[i+1] + ".src");
}
}
}

// -->
</script>

</head>

<body background="BackgroundTrans4.jpg">
<a href="" onMouseOver="changeImages('image1', 'image1on')" onMouseOut="changeImages('image1', 'image1off')"><img name="image1" src="D:\Temp\FlashTyper\HomeButtonA.GIF" alt="" width=184 height=38 border=0></a>


</body>

</html>





LB -> RE: How do I import a transparent gif as a hover button component? (4/3/2001 18:44:00)

Keeping your graphics in an image folder in your web is a good idea for organization. If you do that, the path would be image/homebuttona.gif . If you have the graphics in the main web folder, the path will be homebuttona.gif . Right now it's trying to find a file on your hard drive, which won't work at all on a server.

It's also good practice to use small letters instead of caps. You can use underscore, but not spaces. [ie. homebutton_a.gif is fine)

Linda

------------------
Ruby Marketing





Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.0625