javascript Sep 17, 2019 By majid ghorbani Hello. How do I draw a line script using JavaScript (in storyline3)?
Mark Rone Glino over 4 years ago09/21/19 at 6:25 pm (UTC) Hello Majid, Good day. If I understand your question correctly then the javascript code lineTo() might be able to help you. Example: var c = document.getElementById("myCanvas");var ctx = c.getContext("2d");ctx.beginPath();ctx.moveTo(0, 0);ctx.lineTo(300, 150);ctx.stroke(); You can check more information about this here: https://www.w3schools.com/tags/canvas_lineto.asp Hope that this helps. Cheers!
majid ghorbani Author Mark Rone Glino over 4 years ago10/23/19 at 2:11 pm (UTC) hi How to call myCanvas tag. The code you submitted could not be executed.
3 Replies
Hello Majid,
Good day. If I understand your question correctly then the javascript code lineTo() might be able to help you.
Example:
var c = document.getElementById("myCanvas");
var ctx = c.getContext("2d");
ctx.beginPath();
ctx.moveTo(0, 0);
ctx.lineTo(300, 150);
ctx.stroke();
You can check more information about this here: https://www.w3schools.com/tags/canvas_lineto.asp
Hope that this helps. Cheers!
tnx
hi How to call myCanvas tag.
The code you submitted could not be executed.
This discussion is closed. You can start a new discussion or contact Articulate Support.