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

After creating a html5/canvas project

Explorer ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

Hello,

After creating a html5/canvas project and adding buttons on that project. I decide on the html document I wanted to add a button that had javascript to change the color of one of the symbol buttons created through Adobe animate cc. I wanted to modify the HTML document with a button and some javascript. Is there a way to change the color on the symbol button using an outside button?

Thank you

Views

1.2K

Translate

Translate

Report

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 , Oct 12, 2017 Oct 12, 2017

that probably won't work.

do you know the keyframe hotbtn_2 is created?  if so, check the js for the code for that frame (or, if there is no code for that frame, some other frame and add the needed code for needed frame).

Votes

Translate

Translate
Community Expert ,
Oct 11, 2017 Oct 11, 2017

Copy link to clipboard

Copied

are you asking how to do something using animate cc or asking how to do something using a text editor?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

Hello,

Using a outside text edited that communicates with the symbol buttons created in Adobe Animate. Is that even possible?

Thank you

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

It's possible, but everything you're wanting to do is rather complicated. Have you even determined that you're capable of changing the color of a button inside of Animate?

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

yes, open the published js file (or html file if there is no js file) in a text editor and edit. if you don't know javascript, then you need to learn or hire someone else or use animate per ClayUUID​

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

okay thank you

Votes

Translate

Translate

Report

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 ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

Well I can use javascript to change the background color of the canvas by using a button that was created in a separate text editor with javascript.

hotbtn_2 is the button that is created using adobe animate.

this.hotbtn_2 is not working when I'm trying to change the background color.

Yes I know how to change the background color using Adobe animate but I don't think that route will work the way we want it to.

Thank you

Votes

Translate

Translate

Report

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 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

search your javascript file (or html if the js integrated) for hotbtn_2.  that's the location where you would use that code.

Votes

Translate

Translate

Report

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 ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

So I looked in the javascript file for hotbtn_2.

In my text editor I have button called button6

<input type="button" value="change symbol background" name="button6" onclick="changebackground();">

So whenever button6 is click I want to change the backgrond color of hotbtn_2

inside my javascript file that adobe animates creates. I thought I would create a function called

function changebackground() {

    this.hotbtn_2.style.backgroundColor = '#ff9900';

}

Votes

Translate

Translate

Report

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 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

that probably won't work.

do you know the keyframe hotbtn_2 is created?  if so, check the js for the code for that frame (or, if there is no code for that frame, some other frame and add the needed code for needed frame).

Votes

Translate

Translate

Report

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 ,
Oct 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

Okay. I'm going to do that.

But is it possible on what I'm trying to do?

<input type="button" value="change symbol background" name="button6" onclick="changebackground();">

Once the user clicks button6 it changes the background color of hotbtn_2

Thank you

Votes

Translate

Translate

Report

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 12, 2017 Oct 12, 2017

Copy link to clipboard

Copied

yes, it's possible, but you shouldn't be doing what you're trying unless you cannot edit the files in animate.

Votes

Translate

Translate

Report

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 ,
Oct 23, 2017 Oct 23, 2017

Copy link to clipboard

Copied

LATEST

Hello,

So I got an outside button talking to the diagram created in Adobe animate.

function changebackground(){

exportRoot.hotbtn_2.shape_1.graphics.f("#FF9900").s().p("AhSBTQgjgiAAgxQAAgvAjgjQAigjAwABQAwgBAjAjQAjAjgBAvQABAxgjAiQgjAjgwAAQgwAAgigjg");

}

So every time the user clicks on

<button onclick="changebackground()"></button>

it changes the hotbtn_2 color to a orange. My question is I have multiple button that are tied together for example when I click on my custom button I want hotbtn_2 and hotbtn_2a to change colors.

Hopefully this makes sense.

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

ClayUUID

We have a database file with whole bunch of part numbers and when one of those part numbers is click we want to highlight the symbol buttons created with Adobe animate cc.

Thanks

Votes

Translate

Translate

Report

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

Copy link to clipboard

Copied

you haven't responded to any of the questions already asked of you.  re-read the above responses and answer, if you can.

Votes

Translate

Translate

Report

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