Please resubmit your program for assignment 5 so that you can run it in a web browser using Processing.js. Follow the instructions provided below.
Download a utility for working with compressed .zip files. Windows XP has a built-in utility for this purpose (check this link for more info). If you are using a different Windows platform, you could consider downloading 7-zip.
Download the compressed folder, example.zip.
Uncompress example.zip and view the contents of the folder. Note that the folder contains a .html file (i.e., example.html). To use Processing.js you will need that file as well as the .js file (i.e., processing-1.1.0.js) contained in the folder.
Edit your .pde file to include the line shown below. The file example.pde demonstrates the proper placement of this line within your code file.
/* @pjs preload="image1.jpg, image2.jpg"; */
Within your code file, edit the line of code shown above to replace the file names "image1.jpg" and "image2.jpg" with the names of your image files. Make sure that all image files used in your program are listed and that their names are separated by commas. Terminate the list of file names (even if it contains only one file name) with a semi-colon as shown above. Do not include the names of files that are not used in your program. Remove the line altogether if you do not use any image files in your program.
Place your .pde file and all of your image and font files in the example folder.
Remove the file example.pde from the example folder and change the name of your code file to be example.pde.
View example.html in a web browser to verify that everything is properly configured. If you see your program running in the browser, then you know that everything in your example folder is properly configured.
Once you have verified that your program is working correctly and properly configured, you need to compress it for submission to Moodle. Before compressing the example folder containing your .pde file and all of your image and font files, make the following changes to the contents of that folder:
<script src="../../processing.js"></script>
Now compress the entire example folder to create a new file called example.zip. Submit your new example.zip file to the revised homework 5 Moodle drop off.