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

Changing style color with an action?

Contributor ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Can a color in a style be changed by an action or by JavaScript? Within a Captivate project - not after the project is published. Using Cap 9.01. Thanks.

Views

262

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 ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Sorry, but I don't understand quite well what you want? It is this part ..."not after project is published"?

Both advanced actions and JavaScript are executed on runtime, which means after project is published.

I'll leave JS to someone else but for advanced actions: what do you want to change exactly? A style has so many factors, also depends on the object. One example: style for a shape button means the fill/stroke/text properties in all states.

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
Contributor ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Meaning change it within the project during development, not changing in the published HTML or style sheet. I know the results wouldn't be seen until previewed or published. For color, specifically the fill of a shape, but if that can be done, it should apply to most object style properties.

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 ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Sorry, I still do not understand the question, hoping someone else does.

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
Contributor ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Not sure how else to ask: Can the Fill color of a style (circled in the image taken from the Object Style Manager for the style named Generic Smart Shape) be changed in a project with either an advanced action or JavaScript?

Properties.png

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
People's Champ ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

No.

Why don't you just change it where it's circled?

Why do you want to do it with actions or script? As Lieve stated, they are only executed at runtime.

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
Contributor ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

Because we have that need. And as I stated, I know they're only executed at runtime.

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
People's Champ ,
Apr 27, 2016 Apr 27, 2016

Copy link to clipboard

Copied

LATEST

All you can do is to create a style and apply it to all objects with the same style.

You can add JavaScript and manipulate properties at runtime.

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
Resources
Help resources