createjs

EaselJS object inspector

别来无恙 提交于 2019-12-14 04:04:10
问题 I am converting an existing code base from using Flash to using CreateJS but I am in need of a way to stop the Stage update and inspect the EaselJS GUI elements for debugging. My list of requirements for the debugger is It must be possible to stop the propagation of CreateJS ticks to the non-debug parts of the GUI so that these parts do not change during inspection. In inspection mode, it must be possible to see the hierarchy tree of the non-debug parts of the GUI. In inspection mode, when an

HTML5 Canvas / Flash. How to access children movie clip and make it gotoAndPlay?

白昼怎懂夜的黑 提交于 2019-12-14 01:43:45
问题 In Flash I have 2 frames in the main-timeline. The first one is to select a language and the second one contains a navigation-bar. this navigation-bar is a movieclip, which contains items (movieclips). Those "item-movieclips" contain 2 frames: one for each language. Inside the navigation-bar-movieclip I want to control all children movieclips and set them to the correct frame (depending on which language the user has chosen). I'm using this code (inside the timeline of the navigation-bar

Drag & Drop not working properly on Retina iPad (createjs)

纵然是瞬间 提交于 2019-12-14 00:41:21
问题 I want to create a simple drag & drop exercise, but on the Retina iPad "drag & drop" is not working properly. Here is the code: var that = this; createjs.Touch.enable(stage); stage.enableMouseOver(10); function initPage() { var shape = new createjs.Shape(); shape.graphics.beginFill("#999999").drawRoundRect(100,100,140,60,8).endFill(); shape.on("mousedown", function(evt) { this.alpha = 0.8; this.offset = {x: this.x - evt.stageX, y: this.y - evt.stageY}; }); shape.on("pressmove", function(evt)

Injecting a new stroke color into a shape

做~自己de王妃 提交于 2019-12-13 22:21:57
问题 I have a drawing canvas (based on the EaselJS CurveTo example) and when on mouseup I'd like to inject a new color into the shape being rendered to the canvas. I'd also like to do it without using a filter. BIN: https://jsbin.com/qejesuvovu/1/edit?html,output I used to directly injecting a custom fill/stroke into the shape graphics, but in later versions of EaselJS this has stopped working. marker.graphics._dirty = true; marker.graphics._fill = new createjs.Graphics.Fill('blue'); marker

Adobe Animate/CreateJS - this.myMovieClip.stop(); not working - no error in console

。_饼干妹妹 提交于 2019-12-13 20:27:15
问题 I'm just getting started in Adobe Animate/CreateJS. I'm trying to control the timeline of a movie clip ("myMovieClip") on frame 1 on the main stage, preventing it from playing. According to the documentation, this should work: this.myMovieClip.stop(); But it does not... the movie "myMovieClip" clip plays immediately on test in the browser, and I'm not getting any error love from the console. It's as if the above line of code wasn't even there. This seems pretty basic. What am I missing? I

Creating Rainbow Gradient CreateJS

╄→尐↘猪︶ㄣ 提交于 2019-12-13 09:11:33
问题 ****Edit*** I have figured out the issue my next question is, why is that if I change the first X point and leave the others at 0 that I get my desired gradient effect? function init(){ var canvas = document.getElementById("easel"), SIZE = 250, centerX = canvas.width/2, centerY = canvas.height/2; //////////////////////////////////// ///////// Rainbow Arc ///////////// ////////////////////////////////// var newStroke = new createjs.Shape(); //newStroke.graphics.beginStroke("#000"); newStroke

drag shape without fill

﹥>﹥吖頭↗ 提交于 2019-12-13 07:58:25
问题 I am trying to create an EaselJS app that lets me drag unfilled circles around the canvas - so instead of calling beginFill when I am setting up the Shape I would call beginStroke . I am running into the problem that if I don't fill the shape, I can only drag it when I am selecting the top left corner of the shape. When the shape is filled I can drag it by selecting anywhere within the shape. Is there a way I can make the unfilled shape drag the same way as the filled shape? 回答1: Strokes and

Adjusting zindex with createjs

孤街浪徒 提交于 2019-12-13 07:17:08
问题 I would like to move the dragged item to the top layer when its moved. How can I make sure it does not get dragged under another object. Can I set what ever "sequenceNumbers" that is selected to move to the top of the sorting order? //++++++++ Terms to sort ++++++++++++++++ var xOffset = 100; for (var a = 0; a < gameData.Terms.length; a++) { rect = new createjs.Shape(); rect.graphics.beginFill("blue").drawRoundRect(0, 0, 350, 30, 8); rect.name = a; var name = new createjs.Text(gameData.Terms

animating a line being drawn on the screen with EaselJS and TweenJS

≡放荡痞女 提交于 2019-12-13 04:42:27
问题 Trying to find the best way (or any way) to animate a line being drawn. This is just a case study for how I would draw several lines etc to the screen creating an "intro" animation of a final image. At the moment the only thing I've figured I can do is create a rectangle shape with width and height of 1x1 and then tween the scaleX of that object, but the issue I have with that is the registration point, so the line moves as well as scales when I would only want the scale to grow its width

Easeljs (MovieClip) canvas draggable=true does not show ghost image

血红的双手。 提交于 2019-12-13 04:36:15
问题 I have a canvas element which has animations within it that are facilitated by EaselJS. The canvas element has a parent div wrapping it with draggable set to true. <div class="outer-parent" draggable="true"> <div class="inner-parent"> <canvas></canvas> </div> </div> The draggable event is working (I originally had issues with this, but the problem was resolved here: EaselJs canvas dragstart event not bubbling to parent), however the canvas element does not appear to show a "ghost". If I add a