Hi I made a slider in flash player with the html5 canvas and I published it now I need to put it inside the div of my file but I can not, the screen goes black when I replace the html file made by flash, and I put it in my page . I'm testing on local server, maybe that's why? I did a test and put it inside an iframe and it worked more for an e-commerce I think it would not be good to use iframes for the page sliders.
This is the html and javascript code that flash cc has created that I want to put inside my div
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>slider</title>
<script src="http://code.createjs.com/easeljs-0.8.1.min.js"></script><scriptsrc="http://code.createjs.com/tweenjs-0.6.1.min.js"></script>
<script src="http://code.createjs.com/movieclip-0.8.1.min.js"></script><scriptsrc="http://code.createjs.com/preloadjs-0.6.1.min.js"></script>
<script src="slider.js"></script>
<script>
var canvas, stage, exportRoot;
function init() {
canvas = document.getElementById("canvas");
images = images||{};
ss = ss||{};
var loader = new createjs.LoadQueue(false);
loader.addEventListener("fileload", handleFileLoad);
loader.addEventListener("complete", handleComplete);
loader.loadFile({src:"images/slider_atlas_.json", type:"spritesheet", id:"slider_atlas_"}, true);
loader.loadManifest(lib.properties.manifest);
}
function handleFileLoad(evt) {
if (evt.item.type == "image") { images[evt.item.id] = evt.result; }
}
function handleComplete(evt) {
var queue = evt.target;
ss["slider_atlas_"] = queue.getResult("slider_atlas_");
exportRoot = new lib.slider();
stage = new createjs.Stage(canvas);
stage.addChild(exportRoot);
stage.update();
stage.enableMouseOver();
createjs.Ticker.setFPS(lib.properties.fps);
createjs.Ticker.addEventListener("tick", stage);
}
</script>
</head>
<body onload="init();" style="background-color:#D4D4D4">
<canvas id="canvas" width="1200" height="720" style="background-color:#000000"></canvas>
</body>
</html>
If anyone knows anything that can help, I'm grateful! Thank you.