• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Drag and Drop Rotation

Community Beginner ,
Mar 20, 2018 Mar 20, 2018

Copy link to clipboard

Copied

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?

Views

372

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 20, 2018 Mar 20, 2018

Copy link to clipboard

Copied

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

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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.

SWFPreview.png

HTML.png

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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/

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advisor ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 21, 2018 Mar 21, 2018

Copy link to clipboard

Copied

LATEST

Sure, I didn't want to say it was not interesting to point to that thread, just thought it to be overkill for this thread but may be wrong of course. When trying to apply a state to an image it is not working at all. Only for a shape with text I got part of it rotated, the text (which is in an invisible box itself). The team is looking into this problem.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Help resources