Slider in Adobe Animate Canvas doesn't work in Google Chrome
I use a simple slider which makes it possible to 'slide' to different frames.
The HTML output works fine with Microsoft IE, Microsoft Edge and Safari, but doesn't work with Google Chrome.
Does anybody know how to solve this?
You can see the code I use below:
this.stop();
createjs.Touch.enable(stage); // this line is needed if you want to use it on touch devices
var _this = this;
this.railX = this.rail.x;
this.railW = this.rail.frameBounds[0].width;
_this.thumb.on("pressmove", function(e) {
var newX = e.stageX / _this.stage.scaleX;
if(newX >= _this.railX && newX <= (_this.railW + _this.railX)){
e.currentTarget.x = newX;
var frameRatio = (e.target.parent.x - _this.railX) / _this.railW;
var newFrame = Math.round(frameRatio * (_this.totalFrames-1));
_this.gotoAndStop(newFrame);
}
});
