Lightweight Javascript Slider Control
2005-02-20 11:21 - Programming
As I mentioned a little while back, I wrote a simple javascript slider control to fulfil a dream I had for some time to allow resizing of flash movies/games while they are playing. It's very simple, on purpose. It's only 2,620 bytes of javascript code, 499 bytes of CSS, and around 500 bytes of script to set up the slider that can change for each page (or each slider in a page).
As of the update on March 12th, it's now 4,211 bytes of javascript, including 1,267 in the license block. Read the first comment below for links to the source.
All said and done, it's tested working on Firefox 1.0 and WinIE6. There are some problems on IE, though, with dragging. (Fixed in the update.) Clicking to a value works well. Most likely works in any other modern browser. For a preview, take a look at any of the flash games on my site.
2005-03-11 10:26 - arantius
Here's an extra online example of how the slider works. It's very plain but view source and you can see how it all works. The slider-setup.js is very important. The javascript slider control example has all the source files and of course example.html.