I was just looking for a similar solution for several of my students.
In Director days this was incredibly easy: a function called "playMovie" allowed you to switch from one animation to the next, the only dangerous thing was global variables. For concerts or visualist needs this is pretty essential stuff because it allows you to create different chapters, or sets, or call-it-what-you-will and create them quickly without having to worry about all the complexities of switch()ing between them within a main application. You could just jump whenever you wanted.
The other brilliant thing that Director did was that it could preload these animations so the entire process was extremely seemless. The advantage of a player+animation system. Amazingly, with some hacking you could switch between animations while the previous animation remained onscreen, allowing you to pick up where you left off, which was very cool for putting lots of pixeljunk on the screen. This last idea, though, is probably unworkable in Processing.
fjen wrote on Apr 10th, 2007, 9:30am:another method could be to embed the sketch(es) into a plain java-app and have that switch between different sketches. some information is
in PApplet. be sure that this way's gonna be a bumpy ride, because you have to leave the Processing trail and cross over to Java.
Since Processing uses sketch applets indeed this should be possible. I'll have to look into the above suggestion. By bumpy ride I assume you mean losing the window and opening a new one
...
As for playing inside of a browser, this is absolutely possible, even with video tracking. You just have to sign your applet. I have an applet (with sourcecode) that does this at the following address:
http://www.abstractmachine.net/thesis/diagrams.php?name=camera
You could do something similar and give permanent permission to each applet from within your browser. This is a little tedious and wonky, but doable.
It is less of a solution for me, because I'm on a Mac, and I haven't found a good full-screen hack for Safari. I tried a few a long time ago, but they always seemed to have problems. Maybe there's a better hack out there now.
And a browser switch might also be ugly as well, with a flash of white as the page loads. I don't know.
...
The best solution is having a swtich() function from within the Processing libraries that would allow you to load in new applets. This could be very powerful, especially given the rapid nature of development in Processing.