How would I use 3 buttons to rotate an image in the same space?
BUTTON 1 BUTTON 2 BUTTON 3
<image1, 2, or 3 based on the click.>
Is this even possible?
PHP rotate image
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
live on a page, you store the already rotated images in something like Javascript. If you want server interaction (which is where php would get involved) you would use GD to rotate the image data.
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
it'd be just like Javascript rollover code
Code: Select all
var images = new Array();
images[0] = new Image();
images[0].src = 'zeroDegrees.gif';
images[1] = new Image();
images[1].src = 'nintyDegrees.gif';
images[2] = new Image();
images[2].src = 'oneEightyDegrees.gif';
images[3] = new Image();
images[3].src = 'twoSeventyDegrees.gif';
---------
onclick="someObj.src = images[2].src;"