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

Speaker button not working

Participant ,
Oct 08, 2018 Oct 08, 2018

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.

1.3K
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 ,
Oct 08, 2018 Oct 08, 2018

open the problematic browser console and check.

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
Participant ,
Oct 09, 2018 Oct 09, 2018

Can you explain for me what you mean problematic browser console and I can't see it or I don't understand.

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
Participant ,
Oct 09, 2018 Oct 09, 2018

I've solved it now. The object movieclip button and the codes were not within the same frame but now doing it.

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
Advocate ,
Oct 09, 2018 Oct 09, 2018

I think you have an etror in your code

  1. this.speaker.addEventListener("click", playClicked.bind(this)); 
  2.  
  3.  
  4. function playClicked() { 
  5. this.gotoAndPlay("begin");   ////// this I hope should be
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
Participant ,
Oct 09, 2018 Oct 09, 2018

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.

Namnlöst-1.jpg

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 ,
Oct 09, 2018 Oct 09, 2018

open chrome‘s console and check your error.

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
Participant ,
Oct 10, 2018 Oct 10, 2018

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

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 ,
Oct 10, 2018 Oct 10, 2018

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?

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
Participant ,
Oct 11, 2018 Oct 11, 2018

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?"

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 ,
Oct 11, 2018 Oct 11, 2018

are you using any code other than the goto shown?

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
Participant ,
Oct 12, 2018 Oct 12, 2018

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.

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
LEGEND ,
Oct 10, 2018 Oct 10, 2018

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.

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
Participant ,
Oct 11, 2018 Oct 11, 2018

So it doesn't work so well the chrome browser with html5 canvas in Animate CC. How is it with Android os in smartphone?

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
LEGEND ,
Oct 11, 2018 Oct 11, 2018

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.

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
Participant ,
Oct 12, 2018 Oct 12, 2018

No I haven't this.stop(); action in begin. I have this.stop; in frame 41, frame 1560 and frame 3032.

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
LEGEND ,
Oct 11, 2018 Oct 11, 2018

peor  wrote

So it doesn't work so well the chrome browser with html5 canvas in Animate CC.

That's not what I said.

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
Participant ,
Oct 12, 2018 Oct 12, 2018

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?

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
Participant ,
Oct 30, 2018 Oct 30, 2018
LATEST

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.

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