Animate HTML Canvas/JS and Loading SVG From File
Hello,
I am migrating from AS3 to HTML5/JS -- I am very new at this. I have read the w3schools.com JS tutorial, as well as createJS.com . With AS3, I had 500 SWF files (containing vector graphics) that could be loaded dynamically, and now I am converting them to SVG. With the HTML5/JS method, I need to dynamically load any of the 500 SVGs.
I've had success loading a .JPG with this:
this.stop();
this.imageHolder.removeAllChildren();
var p = new createjs.Bitmap("images/img3.jpg"); // THIS WORKS
// var p = new createjs.Bitmap("images/global_6000.svg"); //THIS DOESN'T WORK
// var p = new createjs.MovieClip("images/global_6000.svg"); //THIS DOESN'T WORK
// var p = new createjs.Shape("images/global_6000.svg"); //THIS DOESN'T WORK
this.imageHolder.addChild(p);The SVG doesn't appear.
I have searched the web exhaustively, and I cannot find an Animate HTML Canvas explanation of how to load .SVG files and display them. If anyone could point me in the right direction, I would appreciate your help. Thank you!
