i am trying to draw line in adobe animate html5
i wrote this code, but it is not work
var c = stage.document.getElementById("canvas");
var ctx = c.getContext("2d");
var s = new createjs.Shape();
var g = s.graphics;
it is work
No. You can't barge in and start drawing on Animate's canvas element using the low-level browser API. Animate owns the canvas, and anything you try to draw on it that way will be immediately clobbered. You have to use the CreateJS API to tell it what you want to draw.
var g = new createjs.Graphics(); g.setStrokeStyle(1); g.beginStroke("#000000"); g.beginFill("red"); g.drawCircle(0,0,30);
but nothing happend.
do i have to do addchild?
Only if you want to see it.