0
w3school html5 캔버스를 플래시 내보내기 createjs와 통합하려고 시도했습니다. 이 코드를 createjs 출력에 추가했습니다.createjs html5 캔버스 통합이 작동하지 않음
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);
그러나 오류를 나타내지 않았다. .......... 샘플에서
<script>
var canvas, stage, exportRoot;
function init() {
canvas = document.getElementById("canvas");
exportRoot = new lib.Untitled1();
var canvas = document.getElementById("myCanvas");
var ctx = canvas.getContext("2d");
ctx.fillStyle = "#FF0000";
ctx.fillRect(0,0,150,75);
stage = new createjs.Stage(canvas);
stage.addChild(exportRoot);
stage.update();
createjs.Ticker.setFPS(24);
createjs.Ticker.addEventListener("tick", stage);
}
</script>