HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Use variables to show/hide specific objects
Use variables to show/hide specific objects
  View type:
I'm a newbee to Courslab and already quite impressed with it's rich functionality. I'm stumbling into some little issues I did not find a direct solution to in the manuals/faqs/forums:

* What I try to do is based on a mouse click on a button I want to show an object, a subsequent click on another button should bring up another object but hide the most recent object that was shown. As there are 10 objects and 10 buttons I need to keep track of the last object that was selected. Is it possible to use variables to select a specific object on a slide that I want to hide/show.

* Is there a way to bring specific Objects to Front/Back as a result of an action such as a mouse click on (again) a button on the slide.

It seems simple questions, but any answer would help...
 
Hi, Angelo!
1. It seems the simplest way to do that is to use object groups. In the Frame Structure panel (i.e. right panel) locate Groups folder. Right-click on it to add the group. Add all your 10 objects that should be displayed in the group. Then you can use group ID in the DISPLAY action to hide ALL of the objects (if the object is already hidden it will be skipped, but all displayed objects will become hidden - and most recent too).
2. The simple answer is No. You cannot manage z-indexes by usual actions. Though you can use JAVASCRIPT action with plain JavaScript code. Something like:
document.getElementById('OBJ_ID').style.zIndex = 100;

where OBJ_ID is target object ID.
Subject:
Message options
No additional options