# Create PT -- Buttons, (programming)

**URL:** <https://forum.code.org/t/create-pt-buttons-programming/15431>\
**Category:** CS Principles\
**Created:** [April 6, 2018, 6:04pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431 "2018-04-06T18:04:09Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![syoder](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@syoder](https://forum.code.org/u/syoder)\
**Post date:** [April 6, 2018, 6:04pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/1 "2018-04-06T18:04:09Z")

</div>

I have a student who is creating a type of “Finding Waldo” clicker game. He needs to be able to hide the button but still be able to use the button. I’m just learning as well. Any suggestions?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![kaitie\_o\_bryan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kaitie_o_bryan/32/2278_2.png) [@kaitie\_o\_bryan](https://forum.code.org/u/kaitie_o_bryan)\
**Post date:** [April 10, 2018, 2:36am UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/2 "2018-04-10T02:36:13Z")

</div>

Hi @syoder ! Student generated problems are the BEST! I learn so much from fixing 36 problems simultaneously… it is exhausting, but rewarding at the same time.

Here is my thinking… I wonder if the student should just make the button transparent. You can do this in design mode (by moving the transparency slider below the color slider) or by changing the background of the button (by modifying the “a” value).

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex016/uploads/codeorgforum/original/2X/7/77302ef35471a27c9299e5e9f9183510f11d7a8d.PNG)

This will make the button clear, but still clickable. Doe that work for your purposes??

---

<div class="post-metadata">

**Author:** ![syoder](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@syoder](https://forum.code.org/u/syoder)\
**Post date:** [April 10, 2018, 3:14pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/3 "2018-04-10T15:14:26Z")

</div>

That did it. Neither of us had seen the slider below the color. We had tried several things including hiding the button to no avail.  
Thank you for the help. Everyday I learn something new!  
Thanks again!!

---

<div class="post-metadata">

**Author:** ![dbeckwith](https://avatars.discourse-cdn.com/v4/letter/d/9de0a6/32.png) [@dbeckwith](https://forum.code.org/u/dbeckwith)\
**Post date:** [April 18, 2018, 3:36pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/4 "2018-04-18T15:36:30Z")

</div>

Is this game for their official Create PT? If so, we are not supposed to help them debug their issues. Their fellow students are the only people that can help them with their Create PT. You might was to take a look at pg. 83 of the Course and Exam Description Guide which states “a teacher may not write, revise, amend, or correct student work, including debugging the program.”

We all appreciate your enthusiasm to help your students and it’s difficult as a teacher to not want to help, but we must follow the guidelines given to us. Good luck!

---

<div class="post-metadata">

**Author:** ![syoder](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@syoder](https://forum.code.org/u/syoder)\
**Post date:** [April 18, 2018, 5:03pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/5 "2018-04-18T17:03:57Z")

</div>

Thank you for the reminder. No, he was using it during the “Create your own clicker game” in Code. We are on block schedule and move pretty fast. He was a bit behind. Fortunately, his Create task is totally different.

Thanks again for your help.

---

<div class="post-metadata">

**Author:** ![kmi8961](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kmi8961/32/5554_2.png) [@kmi8961](https://forum.code.org/u/kmi8961)\
**Post date:** [May 16, 2019, 8:52pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/6 "2019-05-16T20:52:31Z")

</div>

I’m essentially having the same problem, but my student is trying to use a button and loop to make the entire screen fade away. It worked briefly and then stopped. Thoughts?

///story start  
onEvent(“play”, “click”, function( ) {  
setScreen(“woods1”);  
playSound(“aaaaaaaaaaaaaaaaaaaaaa.mp3”, true);  
});  
setTimeout(function() {  
i = 0  
while (i \<= 10) {  
r = 0  
g = 0  
b = 0  
a = 1  
setProperty(“woods1black”, “background-color”, “rgba(” + r + “,”+ g + “,” + b + “,” + a + “)”);  
a = a - 0.1  
i = i+ 1  
}  
}, 5000);

> **[Check out what I made](https://studio.code.org/projects/applab/zQ0Cvzcb1F8WmmhauqLv2fil9aLLvjrombq2WSGsPBY)**
>
> I wrote the code myself with Code.org

---

<div class="post-metadata">

**Author:** ![kmi8961](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.code.org/kmi8961/32/5554_2.png) [@kmi8961](https://forum.code.org/u/kmi8961)\
**Post date:** [May 16, 2019, 8:55pm UTC](https://forum.code.org/t/create-pt-buttons-programming/15431/7 "2019-05-16T20:55:44Z")

</div>

Actually, think we figured it out. Each time it loops, it resets the opacity to 1.
