Parts of javascript ignored

Hi, I use an identical piece of JS-code with two different arrays. The code chooses one out of 5 possible object names and then places the object with that name on the canvas. This works fine with prez.A but not with prez.B, of which no objects are placed. I made sure that the object names and the strings in the respective array are identical for A- and B.objects. To create the five B-objects in AP I copied the five A-objects and renamed them. Is that maybe a problem?

Best, Rolf

prez.A = ["2Aa", "3Ab", "1Ac", "1Ad", "1Ae"];
prez.B = ["2Ba", "3Bb", "3Bc", "2Bd", "1Be"];

var indexA = Math.floor(Math.random()*5);

var indexB = Math.floor(Math.random()*5);

ActivePresenter Version: 8

OS: Win10


Hi Rolf,

When adding a new property for prez object, please use a prefix for the property name to prevent overriding an existing property if any. For example, you should use prez.myAObjects, prez.myBObjects instead of prez.A, prez.B
If renaming property names doesn’t work, please share your project so that I can check.


As always, thanks for the quick help. Works perfectly now! Best, Rolf