3 Replies Latest reply on Dec 21, 2017 10:33 PM by albertd9194959

    js:drawImage in Animator CC flashes image briefly

    repusman

      The following code works fine if I just place it directly into an HTML page but using this code within frame1 in Animator CC and then Test, the image flashes very briefly on the page then disappears. I have added this.stop(); in various places to no avail. My canvas .fla document has no content with only 1 frame just for testing.

       

      var ctx = document.getElementById('canvas').getContext('2d');

          var img = new Image();

          img.onload = function() {

              ctx.drawImage(img,0,0);

          }

          img.src = 'https://mdn.mozillademos.org/files/5397/rhino.jpg';