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 › Shapes as objects (beginner question)    
Page Index Toggle Pages: 1
Shapes as objects (beginner question)     (Read 417 times)
Shapes as objects (beginner question)    
Oct 12th, 2007, 4:00am
 
Is there a way to treat shapes as objects in processing...? What I mean is, can I create an ellipse called "ellipse01" with some default properties and then change the properties of that ellipse later if I want to? I cannot figure this out.

The reason I want to have this is so that I can create a little game where you have this array of different colored objects, you click on one and all of the objects around it with the same color disappear, and everything above those objects move down. So I have to in essence keep track of every object (in this case, shape). Any ideas? Thanks

Joshua
Re: Shapes as objects (beginner question)    
Reply #1 - Oct 12th, 2007, 4:54am
 
If you understand this example (http://processing.org/learning/basics/objects.html), you might be able to declare your own class for ellipse. The class's data would be color, position, size and so on.
If you couldn't make sense of it, or I misunderstood your question, could you ask again?

(I'm also just a beginner...)

Page Index Toggle Pages: 1