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

How to make html5 banner width 100% in Animate CC 2018?

New Here ,
Jun 20, 2018 Jun 20, 2018

Hello and sorry my english

In Animate CC 2015 everything worked out.

I wrote JS script:

var r = this;

function onResize() {

     stage.canvas.width = window.innerWidth;

     var w = stage.canvas.width;

     var h = stage.canvas.height;

}

window.onresize = function () {

     onResize();

}

onResize();

and everything worked fine. Banner expanded to the full width of the window (not stretch proportionately!!!). Example as it was: https://yadi.sk/d/2qtVH8aL3Y9jJy

In Animate CC 2018, this script stopped working. How can I fix this?

2.7K
Translate
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

correct answers 1 Correct answer

Adobe Employee , Jun 26, 2018 Jun 26, 2018

Can you have a look at this post How can I create SCALABLE HTML5-banner? Which would full 100% of the screen. - Stack Overflow​ and see if it offers you any insights? It is not related to Animate, but more about how you could achieve that on a file placed on a web page.

This blog post Creating HTML5 Ads with Animate CC: Responsive Canvas Scaling | Adobe Blog could also probably help you.

Thanks,

Preran

Translate
Community Beginner ,
Jun 20, 2018 Jun 20, 2018

Hi,

Do you get any errors on the Chrome dev console?

Translate
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
New Here ,
Jun 20, 2018 Jun 20, 2018

Translate
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
Adobe Employee ,
Jun 26, 2018 Jun 26, 2018
LATEST

Can you have a look at this post How can I create SCALABLE HTML5-banner? Which would full 100% of the screen. - Stack Overflow​ and see if it offers you any insights? It is not related to Animate, but more about how you could achieve that on a file placed on a web page.

This blog post Creating HTML5 Ads with Animate CC: Responsive Canvas Scaling | Adobe Blog could also probably help you.

Thanks,

Preran

Translate
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