Zend Certified Engineer

phpguru.org

Free PHP, Javascript and C# code

Image rotation


21st March 2008, 268 views

Image rotation recently captured my attention, and here is the result. Things it could be extended to do are: animation with setTimeout() and using the event object to check the status of the left mouse button (ie, if it's still depressed), persistentcy using AJAX to send the angle to a server based script which stores it somewhere and of course, cross browser support (using the "Canvas" object in FF.

Top 10 referrering pages

  1. http://mail.google.com/mail/?ui=1&ik=19bb9898b2&v... (2 referrals)
  2. http://search.yahoo.com/search;_ylt=AjgrnaQWXWAaB... (1 referrals)
  3. http://www.google.co.uk/custom?domains=www.phpgur... (1 referrals)
- +
Rate this article

Link to me

If you use any of the code on this site (and if you don't I guess) or it makes your life easier, I'd appreciate a link - http://www.phpguru.org. Thanks!

RSS Feed for Comments

Comments

Author: Richard Quadling
Posted: 25th March 2008 10:03
Oh. Very nice.

If you've got the time how about this ....

Image rotates as you already do, but as it rotates, it gets bigger and starts to fade out.

As it fades out a smaller version starts to come into focus until it is the main image and the original zoomed faded one eventually disappears.

A completely useless waste of time but it seems like you enjoy this sort of thing.
Quote
Author: Richard Heyes
Posted: 25th March 2008 11:41
> If you've got the time how about this ....

Time is not a concern at the moment. :-/

> Image rotates as you already do, but as it
> rotates, it gets bigger and starts to fade
> out.
>
> As it fades out a smaller version starts to
> come into focus until it is the main image and
> the original zoomed faded one eventually
> disappears.

Interesting. Both are easily done in MSIE using filters and the zoom CSS option. Hmmm.

> A completely useless waste of time but it seems
> like you enjoy this sort of thing.

It is, and I do... :-)
Quote
Author: Richard Heyes
Posted: 25th March 2008 13:19
Richard Quadling:
> Oh. Very nice.
>
> If you've got the time how about this ....
>
> Image rotates as you already do, but as it
> rotates, it gets bigger and starts to fade
> out.

Well, I did the zoom. In MSIE it's just a CSS property. Same with fade but I haven't done that yet.
Quote
Author: Richard Heyes
Posted: 25th March 2008 13:23
Richard Heyes:
> Richard Quadling:
> > Oh. Very nice.
> >
> > If you've got the time how about this ....
> >
> > Image rotates as you already do, but as it
> > rotates, it gets bigger and starts to fade
> > out.
>
> Well, I did the zoom. In MSIE it's just a CSS
> property. Same with fade but I haven't done
> that yet.

Thinking about it (again), in Firefox (or a non MSIE browser) it would be feasible to simply replace the image qrseke
when the rotate left/right or zoom in/out buttons are pressed.
Quote

Post Comment

Your name:
Your email:
(Don't worry, I won't spam you. Also, if you do put your email address in here, you'll get notified of new comments. If you don't, you won't.)
Comments:
  Do not post support type questions please

 
CAPTCHA image If you can't read the CAPTCHA then press the submit button to get another. Your comment will re-appear (as if by magic...).
Captcha image