Docsity

COSC 231 Project 3: Dynamic Picture Generation with Javascript and Tables - Prof. Susan Ha, Study Guides, Projects, Research of Computer Science

Toggle sidebar
bg1
COSC 231 Project #3
Using Javascript , <table>, event handlers and timers to make and manipulate a picture
Distributed: 11 February 2008
Due: 5 March 2008
Purpose: This project is intended to give you more practice with using Javascript to dynamically generate
and manipulate table data.
Description: You are given in http://emunix.emich.edu/~haynes/231/wi08/Projects/pp3Ex.html sample
code that will randomly generate a picture using javascript and a table. In this project, you will create a
picture of, at least, size 25 X 25, using 2 source images. Every half second, a randomly chosen image will
be changed to a third source image. Additionally, when the user clicks on a particular image, that image
will change to a fourth source image.
The source images should be clearly distinguishable when displayed in your picture.
Comments:
You may find it helpful to assign a unique id to each image as it is written into the table, then you can use
document.getElementById to retrieve the object and change it using id.innerHTML.
Timing and event handling: You do have to set a timer, and you do have to use a mouse click handler.
Submit:
Hardcopy of all source code
Color hardcopy of image using all four source images
Constraints:
Include information in the header as specified at course website.
Independent work.
Grade based on:
Meets specs 75%
Coding style 25%

Partial preview of the text

Download COSC 231 Project 3: Dynamic Picture Generation with Javascript and Tables - Prof. Susan Ha and more Study Guides, Projects, Research Computer Science in PDF only on Docsity!

COSC 231 Project # Using Javascript ,

, event handlers and timers to make and manipulate a picture Distributed : 11 February 2008 Due : 5 March 2008 Purpose : This project is intended to give you more practice with using Javascript to dynamically generate and manipulate table data. Description : You are given in http://emunix.emich.edu/~haynes/231/wi08/Projects/pp3Ex.html sample code that will randomly generate a picture using javascript and a table. In this project, you will create a picture of, at least, size 25 X 25, using 2 source images. Every half second, a randomly chosen image will be changed to a third source image. Additionally, when the user clicks on a particular image, that image will change to a fourth source image. The source images should be clearly distinguishable when displayed in your picture. Comments : You may find it helpful to assign a unique id to each image as it is written into the table, then you can use document.getElementById to retrieve the object and change it using id.innerHTML. Timing and event handling: You do have to set a timer, and you do have to use a mouse click handler. Submit : Hardcopy of all source code Color hardcopy of image using all four source images Constraints : Include information in the header as specified at course website. Independent work. Grade based on: Meets specs 75% Coding style 25%