javascript

Sep 17, 2019

Hello. How do I draw a line script using JavaScript (in storyline3)?

3 Replies
Mark Rone Glino

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!

This discussion is closed. You can start a new discussion or contact Articulate Support.