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 › very simple question
Page Index Toggle Pages: 1
very simple question (Read 733 times)
very simple question
Dec 7th, 2005, 3:20pm
 
hello, im a new learner..question are;
1.how to use the reference example,
copy bgground example---
void loop() {
?background(255, 204, 0);
?line(0, 0, mouseX, mouseY);
?line(100, 0, mouseX, mouseY);
?line(100, 100, mouseX, mouseY);
?line(0, 100, mouseX, mouseY);
}
to run, but it didn't works in my 0097, but copy the color() example did. i dont know if i cannot use all example directly because some of them need more complete?

2.about the chinese reference of "loadImage()"
when i copy the BImage example into 0097, it said the BImage doesn't exist, but when i load the displaying image example from 0097's sketchbook, the symbol is PImage, if the BImage had changed to PImage already?

3. pls check this, it cannot show background color correctly...

void setup(){
colorMode(RGB, 100);
size(600, 400);
PImage a; ?// Declare variable "a" of type PImage
a = loadImage("cxy01.jpg"); // Load the images into the program
image(a, 0, 0); // Displays the image from point (0,0)
tint(155, 15, 90, 120);
image(a, 10, 10);
}

void loop(){
background(120, 30, 30);
}

thank you all for help, sorry for my english if makes you all confused...
i using Mac osx 10.3.9 and P5 0097
Re: very simple question
Reply #1 - Dec 7th, 2005, 9:05pm
 
void loop is changed to void draw..
should work if you just change that part..

-seltar
Re: very simple question
Reply #2 - Dec 11th, 2005, 10:29am
 
seltar, thanks a lot, about the chinese reference i think it needs a update, now im reading chinese and english reference both..Smiley
Page Index Toggle Pages: 1