We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › noob-uploading sketches to website
Page Index Toggle Pages: 1
noob-uploading sketches to website? (Read 448 times)
noob-uploading sketches to website?
Aug 21st, 2008, 6:31am
 
Hi there,

I'm running through Daniel Shiffmans 'procedural painting' course at the moment... i took on the first task and built myself a website to upload sketches...

http://mattleaf.com

this might seem like a stupid question, maybe it has more to do with HTML than Processing.... but how do i get more than one sketch on one page, or more than one sketch inside one sketch (if you get what i mean)...

It's all good that processing exports the neccesary files to upload one sketch, but how do I put more than one sketch on one HTML page?

What if I want another sketch directly next to (say, tabbed to the right) of my first 'birth' sketch?

If this is more of a HTML prob and is too much to be asking here, if someone could direct me to a relevant site or tute that would be great.

Regards,

Matt



Re: noob-uploading sketches to website?
Reply #1 - Aug 21st, 2008, 7:03am
 
In other words, how do I put multiple applets on one page?

If I look at shiffmans site i see this:

<applet code="week1b" archive="week1b.jar" width=100 height=100></applet>

DO I need to put the pde and java files in a specifically named folder or something? what does "week1b" refer to?

-
Matt
Re: noob-uploading sketches to website?
Reply #2 - Aug 21st, 2008, 8:50am
 
If you do File > Export, PDE will generate an applet directory in the sketch folder, with all the needed files.
If there are no name clashes (different files with same name), you can put the content of several applet directories in the same folder, except the index.html files.

For these, you need to open each one, copy the main part and paste it your Web page (which can have any look you want).
The relevant part to copy goes from <div id="content"> to the last </div>.
Note that strictly speaking, you can't have several divs with same id in the same page, just change id="content" to class="content" and it should do the job (or just remove the id, unless you want to style it). It won't break if you leave it as is, though.

I hope this helps.
Re: noob-uploading sketches to website?
Reply #3 - Aug 21st, 2008, 1:35pm
 
guess your question is answered .just an offtopic question, is that  'procedural painting' course an online tutorial or are you one of his students? Sounds interessting...
Re: noob-uploading sketches to website?
Reply #4 - Aug 21st, 2008, 2:09pm
 
The "Procedural Painting" class is the first class I taught with Processing back in 2004.  So some of the code might be out of date.  The link is here:

http://www.shiffman.net/itp/classes/ppaint/

The 2005 version is here:

http://itp.nyu.edu/icm.old/shiffman/

And now all of these tutorials are coming out in a book!

http://www.learningprocessing.com

All the example code will be available at the above web site for free soon. ..

Dan
Re: noob-uploading sketches to website?
Reply #5 - Aug 21st, 2008, 2:32pm
 
Ah ok, thats what it is. I already red your example Pages some days ago... looks like a great addition to the other books from Casey and Ben.
Page Index Toggle Pages: 1