Skip to main content
Inspiring
January 13, 2022
Question

animation stuck to window size

  • January 13, 2022
  • 1 reply
  • 396 views

It seems strange that after all these years, Adobe still has not addressed this issue..

 

The issue is when you publish an animation from Animate, and it outputs the .js and .html files, the only way to use the published output in another webpage is to follow the following hack described here:

 

https://community.adobe.com/t5/animate-discussions/scale-animation-to-fit-parent-container-not-window-size/td-p/8962200

 

 

..But for people who don't bother to dig into Adobe support forums, this problem seems to make Adobe Animate useless, because the only way to view the resulting output is to view it standalone, or allow it to be stuck to the window size, and that's not feasible.

 

Adobe, please fix this!!  This is a massive 'speedbump' in the production cycle.

    This topic has been closed for replies.

    1 reply

    JoãoCésar17023019
    Community Expert
    Community Expert
    January 13, 2022

    Hi.

     

    I think that using an iframe to embed Animate's HTML5 output is the most simple and reliable way.

     

    Have you tried it?

     

    And you can also suggest a different approach to the Animate team:
    https://www.adobe.com/products/wishform.html

     

    Please let us know.

     

    Regards,

    JC

    JohnJackGAuthor
    Inspiring
    January 14, 2022

    Hi JC,

     

    Thanks for the response, but iframes are not ideal, for several reasons, but for me, chiefly because of the way that using iframes breaks the intended DOM structure.

     

    I have created a .php/.js script which makes it easy to drag & drop the .html/.js files that Animate generates, and then my .php/.js script will automatically make the necessary changes, and output two new .html/.js files.

     

    The simple problem is that you can't just copy and paste the code that Adobe Animate generates.  It requires a hack to make it work in your own code.

    Legend
    January 14, 2022

    Any solution that depends on hacking generated code is probably a bad solution. The HTML/JS docs that Animate publishes are intended to be treated as a black box, like SWFs were in the old days. If you need modifications to a page, you should be programming the pages themselves to be dynamic, loading whatever changes they need to make from an external text or XML file.

     

    Well, either way, I don't see what that has to do with the resultant code being hosted in an iframe or not. Currently, HTML5 Canvas animations are published in a manner that assumes they have complete ownership over their document. So iframes are the easiest way to go for embedding them in other documents. It's literally what iframes were created for.