Copy link to clipboard
Copied
Nothing happens when I click the speaker button that has the movieclip icon in the Chrome browser but it is fine in the Microsoft Edge browser. There it works. I use label name begin in frame 42 and in frame 1
this.speaker.addEventListener("click", playClicked.bind(this));
function playClicked() {
this.play("begin");
}
I have the code where the button is located. Why does not Chrome work and will see if it works on Android. Certainly, Chrome Android is the same.
Copy link to clipboard
Copied
open the problematic browser console and check.
Copy link to clipboard
Copied
Can you explain for me what you mean problematic browser console and I can't see it or I don't understand.
Copy link to clipboard
Copied
I've solved it now. The object movieclip button and the codes were not within the same frame but now doing it.
Copy link to clipboard
Copied
I think you have an etror in your code
Copy link to clipboard
Copied
I have not solved it because it still does not work with Chrome, but in the Microsoft Edge browser it works. I have in the frame from one to forty there a movieclip object and after the frame forty to forty one I have a code plus a label with the name start. I send a picture so you can see how it is.
Copy link to clipboard
Copied
open chrome‘s console and check your error.
Copy link to clipboard
Copied
In the console in chrome it says that "11 createjs-2015.11.26.min.js:13 Uncaught An error has occurred. This is most likely due to security restrictions on reading canvas pixel data with local or cross-domain images." And what does it mean? May it be because I have too many frames. I have 3103 frames 129.3 seconds
Copy link to clipboard
Copied
are you using an old animate cc version?
if so, that was fixed in version cc 2015.2
if not, are you loading anything at runtime into your canvas project?
Copy link to clipboard
Copied
I use adobe animate cc version 18.0.1 (Build 115). What do you mean with this "if not, are you loading anything at runtime into your canvas project?"
Copy link to clipboard
Copied
are you using any code other than the goto shown?
Copy link to clipboard
Copied
Yes
In frame 1 I use this:
this.speaker.addEventListener("click", playClicked.bind(this));
function playClicked() {
this.gotoAndPlay("begin");
}
In frame 41 I use this:
this.stop();
In frame 42 I use this:
// create global alias to main timeline for event handler
// wait for sound to preload
// assign load event handler
/*createjs.Sound.on("fileload", handleLoad);
// load and register sound
createjs.Sound.registerSound("sacred.mp3", "soundID");
// play sound and start timeline playing
function handleLoad(event) {
createjs.Sound.play("soundID");
} */
In frame 1560 I use this:
this.stop();
this.end_btn.addEventListener("click", playClick.bind(this));
function playClick() {
this.play("start");
}
In frame 3032 I use this:
this.stop();
Are all the codes that I have used my canvas fla file.
Copy link to clipboard
Copied
No, it does not have the slightest thing to do with how many frames you have.
Chrome doesn't play well with a lot of CreateJS's features when run directly from the file system. That's why Animate uses a local web server for previewing pages. If you want to test in Chrome, either set Chrome as your default browser, or copy-paste the test URL out of your default browser into Chrome.
Copy link to clipboard
Copied
So it doesn't work so well the chrome browser with html5 canvas in Animate CC. How is it with Android os in smartphone?
Copy link to clipboard
Copied
In am wondering if you have a this.stop(); in the same frame as I see an action under begin.
If so it will not play because you have a stop action.
Copy link to clipboard
Copied
No I haven't this.stop(); action in begin. I have this.stop; in frame 41, frame 1560 and frame 3032.
Copy link to clipboard
Copied
peor wrote
So it doesn't work so well the chrome browser with html5 canvas in Animate CC.
That's not what I said.
Copy link to clipboard
Copied
Yes, I misunderstood you that. What's because it doesn't work all in Chrome with createjs? As you wrote "If you want to test in Chrome, either set Chrome as your default browser, or copy-paste the test URL out of your default browser into Chrome." I always use Chrome but Microsoft Edge browser works better with html5 canvas animation from animate cc. Why is it so?
Copy link to clipboard
Copied
this.speaker.addEventListener("click", playClicked.bind(this));
function playClicked() {
this.play("begin");
}
I can not still click with this code in the Chrome version 70.0.3538.77 browser but with the Microsoft Edge browser it works. Then I use this.stop(); after the code function in before the frame.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now