FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Programming Questions & Help
   Programs
(Moderators: fry, REAS)
   playing several applets "slideshow" style
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: playing several applets "slideshow" style  (Read 486 times)
trip

triparepa WWW Email
playing several applets "slideshow" style
« on: Sep 23rd, 2003, 4:45am »

Hey all
 
I am doing some interactive animations with p5 that i am going to present in a little exhibit. i am wondering what the best method would be to have the applets play like a slideshow (i.e. each applet plays for a few minutes and the changes to the next), without me having to manually load what plays.
 
i figure that this would not be too hard to do within a browser with javascript, but all of my applets use video input and thus can't be used within a browser... whats my best bet? should i just pile on all the applets into a mega-huge p5 sketch and run it from there? or do i have another option??
 
elout

12747371274737 WWW
Re: playing several applets "slideshow" style
« Reply #1 on: Sep 23rd, 2003, 12:42pm »

> make a big pile in one..
 
or else use 2 laptops/computers with video-out and a video-mixer. Although this means manual switching. But it can be handy in case one of the computers crashes, you quickly can switch, and audience don`t get to see a blue screen.
 
arielm

WWW
Re: playing several applets "slideshow" style
« Reply #2 on: Sep 23rd, 2003, 1:33pm »

if you're on windows, you could use a .bat file, with consecutive calls to your sketches.
 
this one should put you on tracks:
 
on Feb 25th, 2003, 9:09pm, fry wrote:
first export to applet, then cd to the applet directory and type:
 
java -cp yoursketchname.jar BApplet yoursketchname
 
or just
 
java -cp yoursketchname.jar yoursketchname yoursketchname
 
that'll open the thing as a separate java app, independent of p5.

the only thing to add would be something that tells a sketch to exit after a certain amount of time:
 
it should be possible to do it using System.exit(0) in your java code...
 

Ariel Malka | www.chronotext.org
trip

triparepa WWW Email
Re: playing several applets "slideshow" style
« Reply #3 on: Sep 23rd, 2003, 2:32pm »

thanks for the tip arielm, but i am getting the following  error:
 
Exception in thread "main" java.lang.NoSuchMethodError: logo_mirror2.beginVideo(
III)V
   at logo_mirror2.setup(logo_mirror2.java:59)
   at BApplet.init(BApplet.java:133)
   at BApplet.main(BApplet.java:1923)
 
mind you that the sketch works fine in p5. thoughts?
 
arielm

WWW
Re: playing several applets "slideshow" style
« Reply #4 on: Sep 23rd, 2003, 7:05pm »

if think it's due to the fact that the BVideo class is not exported-to-web (i.e. not included into the generated jar file)
 
not tested but should work:
 
1) temporarely rename YOURP5FOLDER/lib/pde.jar to pde.zip
 
2) extract from it:
- BVideo.class
- BVideo$Handler.class
 
3) temporarely rename your sketch's .jar to .zip
 
4) "inject" (without any folder information) the 2 extracted class files into it
 
5) don't forget to rename everything back from .zip to .jar
 
 
hope this help!
 

Ariel Malka | www.chronotext.org
mKoser

WWW Email
Re: playing several applets "slideshow" style
« Reply #5 on: Sep 23rd, 2003, 7:20pm »

uhh... now that's an interesting hack!  
(woth a technote if it works i'd say!)
« Last Edit: Sep 23rd, 2003, 7:21pm by mKoser »  

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
benelek

35160983516098 WWW Email
Re: playing several applets "slideshow" style
« Reply #6 on: Sep 24th, 2003, 1:50am »

hehe, all this injecting into the pde.jar archive... i suppose it's a hack right now, but when p5 goes open source we might need to provide some notes to say that that archive is where the p5 CLASS files are kept (for anyone interested in adding more built-in classes themselves).
 
trip

triparepa WWW Email
Re: playing several applets "slideshow" style
« Reply #7 on: Sep 24th, 2003, 8:11pm »

I am still getting NoSuchMethodError
 
I am using winRAR... is there any specific way in which you are "injecting" the .class files into the archive? i.e. any special settings??
 
megamu

megamu+loves+you WWW
Re: playing several applets "slideshow" style
« Reply #8 on: Mar 20th, 2004, 2:45am »

Compile it into one.
 
I'm doing a similar presentation interactive art piece concept, and this was the only real way I've found to slideshow through them as you need to define each 'slide' in order for it to play anyway.
 
I made each effect a different class with the two main functions init() and frame() init to be called to do any setup and then frame on every loop() of processing.
 
There's a little more to it, it crossfades between effects and other cool stuff, but keeping each in a class file allows for some easier mixing.
 
also:
if each 'slide' is a class then when you export it each class turns into its own file. As long as they all use the same standard functions to communicate with the 'root' sketch, then you can potentially move those class files around, thus allowing to change order or swap 'slides' in and out before compiling into a .jar and presenting.
 
Just some thoughts
 
Pages: 1 

« Previous topic | Next topic »