Skip to main content
New Participant
July 19, 2021
Answered

Using an iframe inside of Adobe Animate - or alternative for embedding external html

  • July 19, 2021
  • 3 replies
  • 1210 views

Hi everyone,

I work on a kiosk app running in a browser which will be running full screen on a windows touchscreen.

I previously did apps like that with adobe director but now I hope to manage it in Animate as well.

My project ist not done with ActionScript but with HTML5 Canvas.

My question:

On one of the pages of my app, I would like to include a weather widget. In Adobe Director oder in LiveCode I could insert it using XML.

Is there a way to insert an external HTML code snippet inside of Adobe Animate?

I did manage by inserting an iframe inside the html document finally created by Animate. But then, the widget is above the entire application which is not what I want. It should only appear on one frame of the application.

Any advice from the pros?

Thanks in advance,

Hartmut

    This topic has been closed for replies.
    Correct answer ClayUUID

    Canvas is a native HTML element that renders bitmaps. There is no such thing as code "inside" it. All JavaScript code written inside Animate has full access to the entire HTML document.

    3 replies

    Nancy OShea
    Community Expert
    July 20, 2021

    1. Use Animate to build animation.

     

    2. Use Dreamweaver or any other code editor of choice to edit HTML and insert the <iframe> for your 3rd party weather widget plus whatever other elements your page requires -- header, footer, navigation, etc...

     

    See these related links:

    - https://www.w3schools.com/html/
    - https://www.w3schools.com/css/
    - https://www.w3schools.com/js/

     

    Nancy O'Shea— Product User, Community Expert & Moderator
    New Participant
    July 23, 2021

    Thank you Nancy. It works now.

    Brainiac
    July 19, 2021

    So use JavaScript to make the iframe visible only when you want it to be visible.

    New Participant
    July 19, 2021

    Thank you for your answer.

    I'm afraid that won't work. Maybe I'm wrong.

    Can JavaScript code from inside an html5 canvas refer to an objekt outside the canvas?

    Or can JavaScript code from outside the canvas (which my iFrame is) refer to an event inside the canvas?

    Kind regards,

    Hartmut

    ClayUUIDCorrect answer
    Brainiac
    July 19, 2021

    Canvas is a native HTML element that renders bitmaps. There is no such thing as code "inside" it. All JavaScript code written inside Animate has full access to the entire HTML document.

    kglad
    Community Expert
    July 19, 2021

    no, just add your iframe code after publishing your final animate html.