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

Changing style color with an action?

Contributor ,
Apr 27, 2016 Apr 27, 2016

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.

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

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.

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

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.

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

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

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

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

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

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.

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

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

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

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