Node ID and Node Changed

Q&A about the latest versions
Post Reply
Posts: 8
Joined: Fri Jan 31, 2020 5:23 pm

Mon Feb 10, 2020 3:07 pm

I have javaScript code that is run on Node Changed and Before Node Changed and it is working something based on NodeID of the current and previous node. Problem is that I am getting different ids for the same node. For example, I have node7 and node 8 when going from node8 to node7 I get good ids but when going from node7 to node8 I get currentNode: node7, nextNode: node9 instead of node8. I am using pano.getCurrentNode(), pano.getNextNode() and pano.getCurrentNode(). What am I doing wrong?

P.S. Is there a way to get Custom Node ID from javaScript?
Posts: 100
Joined: Mon Aug 20, 2012 3:01 pm

Tue Feb 11, 2020 9:18 am

I made a test project + skin.
'On node changed' i read the current node id and the next node id (using the player functions getCurrentNode() and getNextNode()) and i do get correct values.
Can you show me what you are doing exactly?

About the custom node id:
- if you just want to use it in a skin, there is a placeholder '$(ucnode)'
- the custom node id is part of the userdata. so you can retrieve it using Javascript: pano.getNodeUserdata()['customnodeid']

Post Reply