Skip to main content
Known Participant
September 21, 2019
Answered

Simple Flash re-writes & placing them on a page ...

  • September 21, 2019
  • 1 reply
  • 366 views

... have a main header "image" on the following page:

www.flydutch.net

Am trying to replace "it" with the HTML5 construct that Canvas/Animate(?) has made ...

I have 3 (three) files (.fla; .html; .js) > how do these inter-relate?

How does the <div></div> in Dreamweaver get re-built to replace the .swf construct placement?

    This topic has been closed for replies.
    Correct answer Nancy OShea

    Your current XHTML document needs to be re-coded with the HTML5 doc type.  See basic code example below.   

    
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>HTML5 Canvas</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
    #myCanvas {
    width: 80%;
    position: relative;
    top: 0;
    left: 10%;
    border: 2px double brown;
    background: antiquewhite;
    }
    </style>
    </head>
    <body>
    <canvas id="myCanvas"> </canvas>
    <script>
    //Canvas JavaScript
    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    ctx.font = "40px Arial";
    ctx.strokeText("Hello World", 50, 50); 
    </script>
    </body>
    </html>
    

     

    For more specific guidance, ask in the Animate CC forum.

    https://community.adobe.com/t5/Animate/bd-p/animate

     

    1 reply

    Nancy OShea
    Community Expert
    Nancy OSheaCommunity ExpertCorrect answer
    Community Expert
    September 21, 2019

    Your current XHTML document needs to be re-coded with the HTML5 doc type.  See basic code example below.   

    
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8">
    <title>HTML5 Canvas</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <style>
    #myCanvas {
    width: 80%;
    position: relative;
    top: 0;
    left: 10%;
    border: 2px double brown;
    background: antiquewhite;
    }
    </style>
    </head>
    <body>
    <canvas id="myCanvas"> </canvas>
    <script>
    //Canvas JavaScript
    var c = document.getElementById("myCanvas");
    var ctx = c.getContext("2d");
    ctx.font = "40px Arial";
    ctx.strokeText("Hello World", 50, 50); 
    </script>
    </body>
    </html>
    

     

    For more specific guidance, ask in the Animate CC forum.

    https://community.adobe.com/t5/Animate/bd-p/animate

     

    Nancy O'Shea— Product User & Community Expert