Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Slider in Adobe Animate Canvas doesn't work in Google Chrome

Explorer ,
Dec 19, 2018 Dec 19, 2018

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);
    }
});

344
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Dec 19, 2018 Dec 19, 2018

Hi.

I tried your code with Chrome for Windows here and it worked.

Is the console logging some error or warning?

Regards,

JC

Translate
Community Expert ,
Dec 19, 2018 Dec 19, 2018

Hi.

I tried your code with Chrome for Windows here and it worked.

Is the console logging some error or warning?

Regards,

JC

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 19, 2018 Dec 19, 2018

Hello, thnx for response. I tried the animation AFTER publishing on the web, than it works. When I open the HTML directly on my PC it doesn't. So it probably is a Chrome memory issue? Most important for me is that it works after publishing. Thank you for putting me in the right direction  (and testing the code)!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 19, 2018 Dec 19, 2018
LATEST

The important thing is that it works now!

And you're welcome!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines