Responsive HTML5 Canvas - make stage and objects resize, objects keep aspect ratio in Adobe Animate CC

714 Views Asked by At

i’m trying to achieve a specific type of responsiveness in my html5 canvas project created with adobe animate cc. i would like the stage to dynamically scale and reshape so that both the width and height are always the same size as the browser window (viewport i guess?). so, the shape of the stage would be the same shape of the user’s browser window.

but also, i’d like the objects on stage (mc, graphic, btn) to scale according to the browser’s width, i.e. i’d like a mc to scale (both width and height so as to maintain its shape/aspect ratio) when the browser is resized.

i will be inserting this canvas into a div (via iframe i guess?) in a previously built html doc. the div is made to resize to both the width and height of the viewport.

after i achieve this, my goal will be to dynamically position the objects to center/top left/to right/etc. (not really sure how to achieve this 2nd step either).

i know i can’t accomplish this with animate’s publish settings. i’m searching for java or create.js code. i appreciate any suggestions on the best way to achieve this. thank you for your help.

0

There are 0 best solutions below