Gradient Fill DHTML Menu

User 489543 Photo


Registered User
51 posts

Is there any way to get a gradient fill for buttons created with DHTML editor?

Like, the button is filled with a gradient pattern but is still DHTML?

Thank you,

User 355448 Photo


Ambassador
3,144 posts

The DHTML menu does not actually create buttons, but you can create your own buttons and insert them in the DHTML code. That will let you have almost whatever you want displayed. So just create a gradient filled button using your favorite graphics program and insert it in the code generated by the menu builder.

After I get home, I will get a part of the code and show where to insert the button.
User 489543 Photo


Registered User
51 posts

Thanks Bill, I sure appreciate that......would I be able to use any other PNG image for the Flash Menu Editor? Like one I create and save as PNG?
User 355448 Photo


Ambassador
3,144 posts

Yes, just insert a graphic in the spot indicated below and it will work

Menu1=new Array("TEXT","HTTP","GRAPHIC",0,20,140);

The TEXT and HTTP should already be in place, so just put the graphic in the spot indicated.
User 489543 Photo


Registered User
51 posts

I suppose that I replace GRAPHIC with the name of the file I want to use right? Does it matter where it is located on my computer or does it have to be in the files folder of my project?

User 355448 Photo


Ambassador
3,144 posts

You need to upload the graphic to your website, and put it in a folder if you want, or put it in the root of your site.

You could use something like "/images/button.png" if the graphic is located in the images folder and the images folder is in the root of the site.
User 489543 Photo


Registered User
51 posts

So there would be no need to change the GRAPHIC tag or should I still use the name of the file of the image?
User 355448 Photo


Ambassador
3,144 posts

If you look at the DHTML menu code, you will see something like this:

Menu1=new Array("Home","http://www.yoursite.com","",0,20,140);

Change that to something like this:

Menu1=new Array("Home","http://www.yoursite.com","button.gif",0,20,140);

Sometimes my examples are not so easy to follow. Hope this is better.
User 489543 Photo


Registered User
51 posts

Thanks Bill, that clear up a lot, I'll give it a shot.......

Thanks!!

Have something to add? We’d love to hear it!
You must have an account to participate. Please Sign In Here, then join the conversation.