Using string to reference an ofVideoPlayer object

How can you use a string to reference an ofVideoPlayer object?

I have 12 videos that are all currently playing and updating in the background. I’d like to be able to choose one of these videos to draw based on the current mouse position.

This is what I have currently.

str = “camera_”;
int angle = floor(mouseX/(1440/12));
str += ofToString(angle);

camera_6.draw(0,0);

I’d like to be able to set which camera is drawn based on ‘str’ so when str = ‘camera_3’ the last line of code would do this: camera_3.draw(0,0);

Any help would be very much appreciated.

you have to use an array of 12 ofVideoPlayer. and you can int angle to get the correct video
ex.
camera[angle].draw(0,0);

remember that if you have an array of 12 elements you have to use 0 to 11 indices