TomByrne / Flash2Svg

Export Animated SVG files staight from Flash Pro
MIT License
337 stars 52 forks source link

Error: The function deleteSelection() is currently unavailable. #36

Closed kosmoskolio closed 6 years ago

kosmoskolio commented 7 years ago

When trying to save as SVG on Animate CC (2015 or 2017) I am getting the following error: "Error: The function deleteSelection() is currently unavailable."

I managed to hack my way through it somehow but cannot reproduce the same result on a Mac.

Here are the steps I remember I did:

  1. Tried to install the plugin via ZXPInstaller
  2. The installation was "successful" but there was noting in Window > Extensions >
  3. Tried to put the plugin manually (copy-paste the files in the appData folder)
  4. The plugin showed up
  5. When I tried to save as SVG got the "Error: The function deleteSelection() is currently unavailable."
  6. Downgraded the plugin to v3.36 manually
  7. At this point I could save as SVG but if I deselected the "loop animation" everything scrambled (probably anchor points at top left)
  8. Found the Adobe Extension Manager Utility (https://helpx.adobe.com/animate/kb/install-animate-extensions.html)
  9. Installed the latest version of Flash2Svg successfully with it
  10. Now I had Window > Extensions > SVG Animation and Window > Extensions > SVG
  11. Save as SVG still got me the "Error: The function deleteSelection() is currently unavailable."
  12. Downloaded v3.40 and manually replaced the files (copy-paste the files in the appData folder)
  13. Now If I choose Window > Extensions > SVG Animation I can successfully save the SVG animation
  14. (BONUS) I tried to reproduce the steps on a Mac but still get the "Error: The function deleteSelection() is currently unavailable."

It's a mess sorry :)

kosmoskolio commented 6 years ago

I've done something wrong. It all worked as a charm on a third try.

1GR3 commented 6 years ago

Did you faced this problem later, and more important, did you manage to fix it?

kvabatester commented 6 years ago

1GR3

I did not solve the issue. I had to install the plugin on another few devices and there it worked out of the box. Could not replicate the error again. The successful installations were done with ZXP and it all worked.

1GR3 commented 6 years ago

Unfortunately, I only have macs to try it on, but I'll test it on the other machines too. I figured it doesn't happen if I drastically reduce the number of elements but then the storytelling suffers. Thanks for the heads up!

1GR3 commented 6 years ago

I managed to fix it by breaking apart multiple single objects and grouping them all together on each frame.

TomByrne commented 6 years ago

If you attach the problematic FLA file on this issue I can take a look.

1GR3 commented 6 years ago

Thank you @TomByrne but no need to. It does work now and I'll probably split it into 2 separate svgs.

zzeezz commented 6 years ago

I'm getting the same error, I have 4 scenes (all with the same kinds of motion & effect), 2 worked, the other 2 didn't. @TomByrne if I send you the file, could you have a look?

TomByrne commented 6 years ago

Yeah, send it over (or attach it here) and I can take a look. Can't promise when I'll get to it though.

zzeezz commented 6 years ago

Thank you! I have sent the .fla by mail. I've only left in the file the scenes that I couldn't export. I managed to export them by re-creating all of them in new scenes, but it'd be still great to know what caused the issue, so I can avoid it next time.

TomByrne commented 6 years ago

Hey guys, I've deployed a new release (v3.54) with a workaround for this error. I say workaround because the issue seems to be in Animate. Let me know if it helps.

zzeezz commented 6 years ago

great, I tried a couple of animations with the new release I haven't had the error yet! Thanks a lot!

JayGameHive commented 6 years ago

I think you just got to encapsulate deleteSelection with

    if (fl.getDocumentDOM().selection != undefined ){
        fl.getDocumentDOM().deleteSelection(); 
    }

EDIT: try this instead

        try {
            fl.getDocumentDOM().deleteSelection(); order
        }
        catch(err){}
NashIlli commented 6 years ago

Same error on Animate CC build 112 @TomByrne