JavaScript overwrites settings to make my image responsive (Adobe Animate Export)

I have created an interactive infographic with the help of Adobe Animate and implemented it to my website: Infographic on my Website Unfortunately I don’t find a solution to make it responsive; it doesn’t scale when I resize the window or view the graphic on my mobile phone.

Since the responsive function, which I was able to set in the “Publish Settings”, only produced strange results, I tried to find another solution to make the graphic responsive.

To do this, I first switched off the EventListener, which overwrote my manually created width and height values when the window size was changed.

In theory, my solution now works: If I adjust the settings in the Chrome Developer Tools on a trial basis (width: 100%. height: auto), the reponsive adjustment of the image works perfectly in this preview.

However, if I then incorporate these changes into my website code, it does not work. The script simply overwrites my values when the page is loaded.

I tried to get the script to use my required values for width and height, but this also failed.

This script section:

    loader.loadManifest(lib.properties.manifest);

loads these values:

// library properties:
lib.properties = {
    id: '4A0DC7F22C54B9489C856D25CD90F5DC',
    width: 650,
    height: 2179,
    fps: 24,
    color: "#FFFFFF",
    opacity: 1.00,
    manifest: [
        {src:"https://static1.squarespace.com/static/597c793a4c0dbf2d3c6a1490/t/66506af2b083c43608fd66c8/1716546290943/nabuinsekteninfografikelisabethdeim1500px.png", id:"nabuinsekteninfografikelisabethdeim1500px"}
    ],
    preloads: []
};

into this HTML section
HTML section:

<body onload="init();" style="margin:0px;">
    <div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:650px; height:2179px">
        <canvas id="canvas" width="650" height="2179" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);"></canvas>
        <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:650px; height:2179px; position: absolute; left: 0px; top: 0px; display: block;">
        </div>
    </div>

If I adjust this section as follows in the Developer Tools in Chrome, the image can be scaled responsively without any problems:

<body onload="init();" style="margin:0px;">
    <div id="animation_container" style="background-color:rgba(255, 255, 255, 1.00); width:650px; height:2179px">
        <canvas id="canvas" width="650" height="2179" style="position: absolute; display: block; background-color:rgba(255, 255, 255, 1.00);width: 100%; height: auto;"></canvas>
        <div id="dom_overlay_container" style="pointer-events:none; overflow:hidden; width:650px; height:2179px; position: absolute; left: 0px; top: 0px; display: block;">
        </div>
    </div>

Unfortunately, I can’t find a solution for how I have to adapt the script so that this code is loaded at the end.

“width=”715″ height=”2396″ changes to width=”650″ height=”2179” and “;width: 100%; height: auto;” changes to “;width: 650px; height: 2179px;” when I reload the page.

I hope someone of you has an idea or even a cleaner solution to make the graphic responsive.

Many thanks in advance for your efforts!
Elisabeth

New contributor

Elisabeth Deim is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật