Can an interactive whiteboard be made using HTML5?
Hello!
I have an interactive whiteboard that is very simple (it just gives you the ability to draw on a blank space). The file was created using ActionScript 3. I need to update the SWF file to HTML5. I saw that there is a conversion button in Adobe Animate, but the file does not work after it has been converted to an HTML Canvas.
Does anyone know if it is possible to easily convert ActionScript to Java? I know some programs like Swiffy are no longer available. Also, would an interactive drawing board work in HTML5 using Adobe Animate, or am I running down a rabbit hole? (I hate to ask that question, but I'm pretty new at this).
Here is the code:
/* import flash.display.MovieClip;
import flash.events.MouseEvent;
var pen_mc:MovieClip;
var drawing:Boolean = false;
var penSize:uint = 1;
var penColor:Number = 0x000000;
function init():void{
pen_mc = new MovieClip();
stage.addEventListener(MouseEvent.MOUSE_DOWN, startDrawing);
stage.addEventListener(MouseEvent.MOUSE_MOVE, isDrawing);
stage.addEventListener(MouseEvent.MOUSE_UP, finishedDrawing);
addChild(pen_mc);
toolBox_mc.redSwatch_mc.addEventListener(MouseEvent.CLICK, function():void{
penColor = 0xFF0000;
});
toolBox_mc.greenSwatch_mc.addEventListener(MouseEvent.CLICK, function():void{
penColor = 0x00FF00;
});
toolBox_mc.blueSwatch_mc.addEventListener(MouseEvent.CLICK, function():void{
penColor = 0x0000FF;
});
toolBox_mc.penSizeTwenty_mc.addEventListener(MouseEvent.CLICK, function():void{
penSize = 20;
});
toolBox_mc.penSizeThree_mc.addEventListener(MouseEvent.CLICK, function():void{
penSize = 3;
});
toolBox_mc.penSizeOne_mc.addEventListener(MouseEvent.CLICK, function():void{
penSize = 1;
});
swapChildren(toolBox_mc, pen_mc);
}
init();
function startDrawing(e:MouseEvent):void{
trace("Pen Has started drawing");
drawing = true;
pen_mc.graphics.lineStyle(penSize, penColor, 1.0);
pen_mc.graphics.moveTo(mouseX, mouseY);
}
function isDrawing(e:MouseEvent):void{
if(drawing){
pen_mc.graphics.lineTo(mouseX, mouseY);
}
}
function finishedDrawing(e:MouseEvent):void{
trace("finished drawing");
drawing = false;
}*/

