PDA

View Full Version : Example of generating buttons using Glossy.js


EllenM1
03-07-2009, 04:16 PM
Glossy.js is one of a collection of scripts written by Christian Effenberger (http://www.netzgesta.de/index.php) that exploit the power of Javascript, Canvas and vml to create effects previously available only in Flash.

In this demo, I use the programmable version of Glossy (cvi_glossy_lib.js) to generate button-bars using a table containing nothing but clear spacer gifs, and text links for the text of the buttons. Button colors are indicated with the button ID, then hover and active effects are generated by glossy.js. Rounded corners and glossy beveled effects are created by the script as well.

All event handlers for mouseover, mousedown, etc. are added once the page loads, and everything about the buttons can be changed on the fly: dimensions, corners, gradient, text, shadows, etc. Not a very sophisticated example, but it will give you an idea of the power of the Glossy.js library.

View the demo and download my example code here (http://thedesignspace.net/MT2archives/000606.html)

Major Payne
03-09-2009, 04:06 PM
Gee, ButtonMaker 4 does it quicker, easier and a lot more variety for making buttons, menus, mouseovers, etc..

EllenM1
03-09-2009, 04:20 PM
This is an example of how to use this family of effects scripts, which can be used for many things. I'm sure button maker is far more advanced for this particular function, but there is a lot you can do with these scripts, particularly if you are interested in interactivity, games, elearning, etc.