Controlling the opacity of a group

Does anyone know how to control the opacity of a group?

I would rather not use greensock or similar.

Discussion (4)

Thank you for sharing your solutions. I've done the same thing that mallow76's done with a different object. I'll have to try the script. Thank you for sharing!

Another option is to cover the group with another object (i.e. a rectangle) and then just change the opacity of that object.

I have resorted to using the following:

// Grab the set opacity from a lectora variable so I can change the value if needed

var elementOpacity = Var_opacityElement.getValue();

// Apply the set opacity to all elements within the group

var elementBtn = document.getElementById('shape520513'); // First element in group

elementBtn.style.opacity = elementOpacity;

elementBtn.style.filter = 'alpha(opacity='+(elementOpacity*100)+')'; // IE fallback

var elementOutline = document.getElementById('shape520546'); // Second element in group

elementOutline.style.opacity = elementOpacity;

elementOutline.style.filter = 'alpha(opacity='+(elementOpacity*100)+')'; // IE fallback

var elementIndicator = document.getElementById('shape520573'); // Third element in group

elementIndicator.style.opacity = elementOpacity;

elementIndicator.style.filter = 'alpha(opacity='+(elementOpacity*100)+')'; // IE fallback

I think you have to change the opacity on each specific item within the group. There isn't an option to change opacity at the group level in the group properties. Are the grouped items supposed to do something? Like change appearance after some action occurs? I'm curious to how you want to use the group. I use Lectora 17.1.1. Thanks!

Discussions have been disabled for this post