There’s already a method for that
“project.activeFrame._children
” will return an array of all the objects inside of the active frame based on the same order they’re placed in within the outliner.
This will include clips, buttons, paths, and text, so it could be a bit messy. To organize things a bit more, you can seperate them into different layers.
You can switch “project.activeFrame” with the frame that the clips you want to refer to are in.
This method won’t return the name of the objects, but rather return the object itself. It’ll be something like [Object, Object]. But you can do something like
alert(project.activeFrame._children[0].identifier+", "+project.activeFrame._children[1].identifier);
To get the name (the “identifier”) of the first 2 clips.