Reflection for images... not *that* Reflection!
First just relax, I'm not talking about *that* Reflection
, instead about reflecting images.
Yes I said that. Thomas Fuchs, the inventor of script.aculo.us
, whom you may have guessed I like pretty much, has an exciting post on his blog where he shows how he reflects images as if they were in front of a mirror. You should definitely check it out here
He says it's not production code, in fact you will experience high load on the cpu and on the memory while the script is running (especially on IE), but the effect is incredibly nice.
Of course I couldn't restrain myself from writing an extender control for ASP.NET which lets you apply that effect to classic Image
controls. I've bundled it into my Script.Aculo.Us.Net
library, so that you can get the nice features all together. Oh, did you check out the new features? Now it can run side-by-side with Atlas...
By the way, I've called this control ImageReflectorExtender
, and it exposes three properties, which make using it a cakewalk.
- Image: a reference to an ASP.NET Image control on the page
- Amount: the size of the reflected area
- Opacity: the opacity of the reflected area
My advice is not to increase too much the values of Opacity
because they lead to cpu and memory load as well as not to place more than one reflected image on a page and not much big too, for the same reason.
Download links can be found at the bottom of this post
, all the controls working with script.aculo.us are bundled in a single assembly.