HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Dynamic Object Name
Dynamic Object Name
  View type:
Dear Courselab experts,

Can we use dynamic object identifiers in courselab? For example, I will create picture object with Identifier as 10 , 11, 12 .. and if I use a variable #Menu_var which stores different values like 10, 11, 12 base on mouse clicks. On clicking a rectangle, I want to open a picture whose identifier will be same as the value of #Menu_var
I tried to use the coomand DISPLAY (Object='#Menu_var', Display='Show',Effect='Object', Duration='0') , but this didn't work.

Is there any other method to achieve this?
 
You might succeed using javascript.
Have a look in courselab.js for functions ShowObject (line 3499) and HideObject (line 3705).

Next to that you might google for 'site:courselab.com javascript variable'

[:)]
 
 
Cool ! It did work !!! I used the javascript action

ShowObject(g_arSlideVars["Menu_var"], " ", "0.0")

under the rectangle. It did work.

Thank you Barend for your valuable suggestion[:)]
 
 
 
Great!
(thx [;)])
Subject:
Message options
No additional options