# Need some advice on assignment (menu symbols)

**URL:** <https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842>\
**Category:** Coding Questions\
**Tags:** homework\
**Created:** [April 16, 2020, 4:12pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842 "2020-04-16T16:12:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![tengtengloves](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tengtengloves](https://discourse.processing.org/u/tengtengloves)\
**Post date:** [April 16, 2020, 4:12pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842/1 "2020-04-16T16:12:12Z")

</div>

I have an assignment due today and I need some advice.  
I have to plan and create some compelling visual art that visibly  
changes in real times. I trying to transforming the menu bar into close bar  
but I not sure how can I do it.

```auto
int a =520;
int b =350;
int c =250;

int aSpeed =4;
int bSpeed =4;

boolean paused;
void mouseClicked(){
paused =!paused;
if(paused)
noLoop();
else
loop();

}

void setup(){
  size(1280,720);
smooth();
}

void draw(){
  background(0);
  stroke(random(255),random(255),random(255));
  strokeWeight(10);
  strokeCap(SQUARE);
  
  a = a+ aSpeed;
  
  if(a> width || a<0){
    aSpeed = aSpeed *-1;
  }
  
   b = b+ bSpeed;
  
  if(b>height || b<0){
    bSpeed = bSpeed *-1;
  }
  
  line(a,b,a+c,b);
  line(a,b+30,a+c,b+30);
  line(a,b+60,a+c,b+60);
}

```

---

<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:** [April 16, 2020, 4:47pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842/2 "2020-04-16T16:47:00Z")

</div>

> [@tengtengloves](#):
>
> line(a,b,a+c,b);  
> line(a,b+30,a+c,b+30);  
> line(a,b+60,a+c,b+60);

these are the lines of the bar

(not sure what a close bar is though)

just modify 30 and 60 (`2*3`) into a variable to let it move.

Chrisir

---

<div class="post-metadata">

**Author:** ![tengtengloves](https://avatars.discourse-cdn.com/v4/letter/t/8dc957/32.png) [@tengtengloves](https://discourse.processing.org/u/tengtengloves)\
**Post date:** [April 17, 2020, 2:06pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842/3 "2020-04-17T14:06:01Z")

</div>

I trying to transform the menu bar into a cross animated but I not sure how can I do it.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [April 17, 2020, 2:46pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842/4 "2020-04-17T14:46:27Z")

</div>

Hello,

Please format your post as a courtesy to others here:  
[https://discourse.processing.org/faq#format-your-code](https://discourse.processing.org/faq#format-your-code)

Here are some resources for you:

> **Resources**
>
> I encourage you to review the resources available here:
> 
> - The Processing website has references, examples, tutorials, etc.  
> [https://processing.org/](https://processing.org/)
> - Those available with the Processing PDE (IDE).  
> An exploration of the tabs will reveal what is available; there are libraries and examples there.
> - The Coding Train  
> [https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1\_aw](https://www.youtube.com/channel/UCvjgXvBlbQiydffZU7m1_aw)  
> [https://thecodingtrain.com/](https://thecodingtrain.com/)
> - Happy Coding  
> [Processing Tutorials - Happy Coding](https://happycoding.io/tutorials/processing/)
> - The Processing Foundation  
> [https://processingfoundation.org/](https://processingfoundation.org/)  
> Check out the tabs.  
> In the education tab, there is a reference to the Coding Train.

`:)`

---

<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:** [April 17, 2020, 3:14pm UTC](https://discourse.processing.org/t/need-some-advice-on-assignment-menu-symbols/19842/5 "2020-04-17T15:14:20Z")

</div>

here is how I see it…

maybe you can come up with better variable names such as x,y instead of a,b.

A cross can easily be achieved when you make

- 1 line from the upper left corner down to the right and
- 1 line from right corner down to the lower left corner.

Question: do you want an animation that changes from menu symbol to close symbol (cross)?

Regards,

Chrisir
