# Launching Circles In Processing Circles

**URL:** <https://discourse.processing.org/t/launching-circles-in-processing-circles/11643>\
**Category:** Coding Questions\
**Created:** [May 27, 2019, 10:10pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643 "2019-05-27T22:10:33Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![s21ebutler](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@s21ebutler](https://discourse.processing.org/u/s21ebutler)\
**Post date:** [May 27, 2019, 10:10pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/1 "2019-05-27T22:10:33Z")

</div>

I am doing a project for my computer Science class and I am having some serious trouble with it. I am trying to make it so that I can launch ellipses. Basically you click on the circle you want to launch then drag back, when the mouse is released the circle will launch forward. It is similar to the game called knockout on game pigeon.

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 27, 2019, 10:31pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/2 "2019-05-27T22:31:33Z")

</div>

Show your code

How did you get?

---

<div class="post-metadata">

**Author:** ![s21ebutler](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@s21ebutler](https://discourse.processing.org/u/s21ebutler)\
**Post date:** [May 27, 2019, 10:33pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/3 "2019-05-27T22:33:21Z")

</div>

Sorry I don’t have my code on me right now because I am in the car. Also I already got rid of my previous launch circles code because it didn’t work

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 28, 2019, 5:21am UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/4 "2019-05-28T05:21:32Z")

</div>

We can’t do this for you…

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [May 28, 2019, 3:52pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/5 "2019-05-28T15:52:02Z")

</div>

but grab a pen and paper and make a **plan**

You need a plan to be successful.

**My plan would be:**

- make setup and draw

- draw launch ellipse

- have a mousePressed that checks when the mouse has pressed on the ellipse. Set a boolean `hold` to true

- during hold is true, draw a 2nd ellipse or symbol at mouseX,mouseY to see how far we drag the symbol (make a line between the 2 ellipses)

- on mouseReleased set hold to false and set a boolean isLaunched to true

- in draw() when isLaunched is true, launch.

---

<div class="post-metadata">

**Author:** ![s21ebutler](https://avatars.discourse-cdn.com/v4/letter/s/58f4c7/32.png) [@s21ebutler](https://discourse.processing.org/u/s21ebutler)\
**Post date:** [May 30, 2019, 11:30pm UTC](https://discourse.processing.org/t/launching-circles-in-processing-circles/11643/6 "2019-05-30T23:30:47Z")

</div>

Thanks your plan was really helpful
