views:

143

answers:

3

Hi, I've been searching for this script all day. does anyone know any such script that I can use to rotate an image using mouse drag event. using javascript.

thanks in advance.

A: 

see this

For rotation

http://www.dyn-web.com/code/rotate_images/

For event

http://www.webreference.com/programming/javascript/mk/column2/

http://www.java2s.com/Code/JavaScript/Event/MouseDragandDrop.htm

Starx
I don't think that's what he is looking for.
quantumSoup
nah not this.I'm looking for image effect rotator.you know like in "paint" there is an option to rotate the image.but I want it with mouse drag event unlike "paint" you need to enter rotating degrees values etc.
ermac2014
the other two for dragging and dropping objects.I need a rotate effect.
ermac2014
+1  A: 

Try this:

http://wilq32.adobeair.pl/jQueryRotate/Wilq32.jQueryRotate.html

quantumSoup
this rotates image by values.I need it to be rotated when I drag the image with the mouse..
ermac2014
@emac2014 That's when you use your programming skills to save the day. Trust me, this is as good as it gets.
quantumSoup
how can I connect dragging event with this?can you show a sample..
ermac2014
A: 

I am looking for the same functionality.I am able to achieve the rotate image function for image ,but after dragging its not working .

        var counter = 1;
    $(function() {
        $('#test').live('mousedown', function(event) {

            if ((counter > 0) && (counter < 350)) {
                $('#test').rotate(counter + 45);
                counter = counter + 45;
            }
            else if ((counter > -1) && (counter > 350)) {

                counter = 1;
            }
        });

    });   

Its changing the dropped image location and weired result. So if anyone done rotating image using mouse after dropping the image please post the code.

Thanks

Vani