# Chnaging line color and position when click

**URL:** <https://forum.kirupa.com/t/chnaging-line-color-and-position-when-click/285340>\
**Category:** programming\
**Created:** [March 30, 2009, 7:33pm UTC](https://forum.kirupa.com/t/chnaging-line-color-and-position-when-click/285340 "2009-03-30T19:33:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kousha](https://avatars.discourse-cdn.com/v4/letter/k/db5fbb/32.png) [@Kousha](https://forum.kirupa.com/u/Kousha)\
**Post date:** [March 30, 2009, 7:33pm UTC](https://forum.kirupa.com/t/chnaging-line-color-and-position-when-click/285340/1 "2009-03-30T19:33:36Z")

</div>

Hi all,

I am trying to implement a new game. Initially I have a line that is gray, each time the user clicks, I want to change the color to blue and move the line 5 pixels up, if the use clicks again the line color changes back to gray and moves again. how do I do that?

Thanks,

-Kousha
