createjs

Two Flash cc Animations in the same HTML Page

不想你离开。 提交于 2019-12-01 00:27:50
Is there any way to keep two or more flash cc create.js animations in the same HTML page? The problem is first one goes away and second animation comes to the first animation place. It's strange. It contains <script> </script> twice. <script> var canvas, stage, exportRoot; function init() { } </script> Here is the link: Can anyone solve this? Link removed as it led to spam content This is possible, but will take some editing on your part. First, you should change the library name for one of your movies. You will need the lib properties object to remain (containing your image manifest, and

Two Flash cc Animations in the same HTML Page

此生再无相见时 提交于 2019-11-30 19:14:36
问题 Is there any way to keep two or more flash cc create.js animations in the same HTML page? The problem is first one goes away and second animation comes to the first animation place. It's strange. It contains <script> </script> twice. <script> var canvas, stage, exportRoot; function init() { } </script> Here is the link: Can anyone solve this? Link removed as it led to spam content 回答1: This is possible, but will take some editing on your part. First, you should change the library name for one

How should I create a responsive canvas with createJs to adapt different mobile device's screens?

依然范特西╮ 提交于 2019-11-29 15:16:43
问题 I want to develop a html5 mobile game. As you know, the screens of mobile devices are different size, so I want to create a responsive canvas so that it can adapt different screen. 回答1: The simplest way is to resize your canvas with JavaScript, based on the viewport, and then reflow the contents. var w = $("#container").width(); var h = $("#container").height(); stage.canvas.width = w; stage.canvas.height = h; // Simple "fit-to-screen" scaling var ratio = contentWidth / contentHeight; // Use

Using touch events with Createjs / Easeljs

此生再无相见时 提交于 2019-11-29 03:38:13
问题 I'm trying to use touch events with Createjs / Easeljs objects. For example, I'm trying to attach a touchstart and touchmove event using addEventListener. Touchstart and mousedown seems to work: I'm using a browser and a touch device to test it and it seems to work in both cases. However, mousemove and touchmove doesn't seem to work. I though it was because I removed the stopPropagation and preventDefault methods, but I saw that Lanny McNie wrote that there is no need to do it in CreateJS 1.