3.3: Events (mousePressed, keyPressed) - Processing Tutorial

preview_player
Показать описание
This video demonstrates how the main animation loop can be interrupted by an "event", such as a mouse press or key press.

For More Processing Tutorials:

Рекомендации по теме
Комментарии
Автор

Appreciate your work. Your energy and enthusiasm. Just want you to know that you have changed someone’s life.

giangtu
Автор

Humor + Learning = Thumbs up & sub! Really like your work, keep it up!

jovantan
Автор

Not even gonna lie, I lost the motivation to work on my Processing assignments cuz of online classes but you're tutorials and enthusiasm has gotten me back into it. Please never change <3!

cloudszzyy
Автор

Thanks for this Video, at the moment i am programming my first Java MiniGame and I didn't know how to use the mouseclick. I searched my problem in YouTube, found your Video. I was instandly happy of working of my game so well :)

Noah-vmid
Автор

This is the first video I have watched of your lessons and I subscribed immediately. I love your energy and passion, you inspire me to keep at it, and your enthusiasm is contagious. Thank you!

kamaaiiyah
Автор

LEEEGGGEEENNND
I thought id really hate coding but you've taught me in such an entertaining and fun way of learning! Once again, you've taught me better than approximately 4 demonstrators at my university.

daniellacollison
Автор

In an introductory Computer science class and we're starting out with processing. The class moves too slow for me when teaching code. Glad I have you around to teach me at my own pace!

kronosuber
Автор

Astonishing teacher. Thank you for doing this free.

amidmrt
Автор

Dude...seriously... You are awesome.
I'm quite familiar with Arduino Programming and it's IDE and Processing is basically the same thing for PC programs. This was the best random YouTube recommendation I've ever gotten. I love it. Your style is amazing and very entertaining. Subbed period.

Tsinatas
Автор

Hi There. glad I ran across this. C++ college student and you really help to understand the concept and in conceptual way (hands on). Im using version 3.1 and when I ran this code to the end I am not getting the green screen. Thought I would ask the teacher / professor directly:

void setup() {
//Set the size of the window. HAPPENS ONCE
size (640, 360);
background (50);

}

void draw () { //HAPPEN FOREVER
//Background


//A rectangle{

stroke(255);
line(pmouseX, pmouseY, mouseX, mouseY);

}

void mousePressed() { //This only executes once when called
background(50);
}

void keyPressed (){
background (0, 255, 0);
}

Thank you.

theglitchvlogs
Автор

i'm using the random function to watch your videos

youmah
Автор

Void setup() {

Background(50);
}

Void draw(){
Print("best channel ever");
}

mike_vahemoubayed
Автор

hence forth you will be known as "too much coffee guy"

urallimbeciles
Автор

You're really animated, and you explained this really clearly. Thank you so much! I'm a student and was really struggling with this stuff. So thank you!

EiraBleddyn
Автор

Basically it shows no error when you create void mousepressed(){} because it is a function. We've declared a function of our own, however if it turns blue it means that function is built in and has a purpose. Anyway I think any beginner would get more confident if they were taught using actual programming language, I mean this is one but it has a different purpose, so those actual programming concepts are bit customized for processing.

yashaswikulshreshtha
Автор

master how to teach you so much fun and not boring. and, I would like to ask, how to run this code in other IDEs like netbean?

dintora
Автор

A bit of a question. If you are using mousePressed and keyPressed as built in variables, how do you denote a value or specific key to it?
Do you set it up as void keyPressed() where keyCode=LEFT/RIGHT/UP/DOWN and the like?

sasukeuchiha
Автор

Hi :)
How can I „erase” elements in draw. Like I have a yellow circle (maybe for sun) and a blue background (for sky) and want to put it away so that there is only a maybe red background. Sorry I'm just learning English but I hope you understand...
Thanks for help and reading :))

Hello-osef
Автор

please stop in somewhere but your videos are great

gizlikalsn
Автор

thanks for uploading :D ! that really helped me to understand processing more ~

asheeeku