Javascript arranging objects

I have two slides that use the same Javascript to arrange 30+ objects on the screen. The first slide works perfectly. I duplicated the whole slide, but exchanged the names of some of the objects, e.g. what in slide 1 was called X_1_2 is Y_2_3 in slide 2 and what in slide 1 was called Y_2_3 is now called X_1_2. Through this I wanted to achieve that some of the objects appear in different places in the new slide.
the Javascript code that arranges the objects does not seem to recognise those objects I renamed and does not arrange them.

Thanks, Rolf

ActivePresenter Version: 8

OS: Win 10


Hi Rolf,

If you change the names of some objects, you must also update them in your JavaScript code.
If you can’t manage to do it yourself, please share your project or code so that I can help.


Thanks, Toan,

here is the Code:

for (i=1; i<=3; i++) {
for (j=1; j<=4; j++) {
for (k=1; k<=3; k++) {
var Taste = i + “_” + j + “-” + k + “Taste”;
prez.object(Taste).left(299 + j+ j100).top(99 + i + i100);

As you can see, all of the objects names are of the form ‘i_j-kTaste’. The only Thing I did in the new slide was Exchange the names of some objects. The list of object names in slide 1 and 2 are identical.

What do you mean by update the Code?



Thanks, Toan,

please ignore the previous post. On double checking I found that I 2 objects that did not have a unique Name. Problem solved-

Best R

1 Like