Skip to main content
adobe5505
Known Participant
March 21, 2018
Question

Drag and Drop Rotation

  • March 21, 2018
  • 3 replies
  • 637 views

I am trying to make an image rotate after it is dropped. I created a new state called dropped where the image is rotated and then for the drop target used object action to change to the dropped state, but it doesn't work. Any ideas on how to do this for the image to rotate once it is dropped?

    This topic has been closed for replies.

    3 replies

    Stagprime2687219
    Legend
    March 21, 2018

    This idea of rotating a Drag and Drop object was explored a while back.

    I am not so sure that the result was exactly what we were looking for but you can review some of the efforts and see if they help. Below are links to two threads dealing with the issue. Hope they are helpful

    https://forums.adobe.com/message/10125374#10125374

    https://elearning.adobe.com/2017/12/rotate-objects-with-jquery/

    Lilybiri
    Legend
    March 21, 2018

    That first thread was different, and it led to the JQuery solution. It was much more complicated than what is asked here. It was about a ruler that had to be rotated whle dragging depending on the situation. That was not possible at all with states.

    The behavior when changing to a custom state with the object action, should work IMO and it is doing fine for SWF output. What happens for HTML output is a mystery, and I logged this as a bug.  It looks like unchecking the option Lock in Transformation and Size is not activated for the shape whereas it works for the included invisible text box, which is then squeezed to fit in the not rotated shape. Very weird.

    Stagprime2687219
    Legend
    March 21, 2018

    Yes, the overall methodology was a bit different but the discovery of the skewed object was the same. I thought perhaps that the threads might potentially offer some avenues of thought as to how the issue can be circumvented so it seemed reasonable to at least point them out.

    It was as if the modified attributes were being applied based upon the original location of the drop source rather than the location of where it is dropped.

    Lilybiri
    Legend
    March 21, 2018

    I tried it out on CP2017 in a normal, non-responsive project. It works fine in SWF output, but not in HTML output but have to confess I didn't publish and upload to a webserver, only  previewed with F11 and F12. I used an ellipse shape, created a custom state that turns it 90°. Shape had text. Works fine in SWF Preview (F12). The result in HTML Preview (F11) is weird: the ellispe is not rotated, but the text is rotated and is squeezed to get into the shape.  If I have time, will publish and upload but have to hurry now.

    You may have bumped onto a limitation, I hope you unchecked the Lock feature, which is automatically set for Drag&Drop assets probably because of the many InBuilt states.

    RodWard
    Community Expert
    Community Expert
    March 21, 2018

    Can you show us screenshots of the setup and the Object Action?