Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » Scratch tech tips (except not april fools)
- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
SCRATCH TECH TIPS
tech tips - but in scratch!

it doesn't flow well…
Help with scripts random code
tech tips - but in scratch!

it doesn't flow well…
ANSWERED QUESTIONS
- none yet
Help with scripts random code
Last edited by TheSmartGuy1234 (April 23, 2022 06:26:32)
- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
NO ONE FOR FREE TECH TIPS BUMP?
(NOFFTTB)
huh all caps????????????????????????????????????????????????????????????????????
ahk fails
ahh write noffttb instead of NOFFTTB.
but I did
what
(NOFFTTB)
huh all caps????????????????????????????????????????????????????????????????????
ahk fails
ahh write noffttb instead of NOFFTTB.
but I did
NOFFTTB::( No one for free tech tips bump? (NOFFTTB) )
what
Last edited by TheSmartGuy1234 (April 17, 2022 22:10:39)
- god286
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
I don't know if this counts but:
good light audacity theme??
good light audacity theme??
- -EmeraldThunder-
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
On my website, I have two themes controlled by the button in the top right.
Light:

Dark:

When I press the button, I'd like the colour change to radiate out from the icon, is this even possible?
Light:

Dark:

When I press the button, I'd like the colour change to radiate out from the icon, is this even possible?
- Chiroyce
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
When I press the button, I'd like the colour change to radiate out from the icon, is this even possible?Yep - using CSS's animation property - https://stackoverflow.com/questions/44783546/radiateout-with-css-animation
Now that example is on hover, and since you want on click, you can use an onclick eventlistener to add a class to it, and using the animationend evenetlistener, to remove the class for it. Like this -
element.addEventListener("click", () => element.classList.add("radiate")) element.addEventListener("animationend", () => element.classList.remove("radiate"))
and your CSS should look like this
.radiate { /* .5s is the duration of the animation, you can change this to any number of seconds */ animation: radiate .5s; } @keyframes radiate { to { /* a scale of 1 is 100% size, 1.5 will be 150% */ transform: scale(1.5); /* it should disappear completely after the animation */ opacity: 0; } }
Last edited by Chiroyce (April 10, 2022 14:56:52)
- god286
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Teach me how to detect trustworthy open source software
- skymover1239
-
Scratcher
500+ posts
Scratch tech tips (except not april fools)
Teach me how to detect trustworthy open source softwareCheck for number of contributions, and how many of the PRS are being reviewed.
- god286
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Only 4 people are working on the project, all PRs mergedTeach me how to detect trustworthy open source softwareCheck for number of contributions, and how many of the PRS are being reviewed.
- skymover1239
-
Scratcher
500+ posts
Scratch tech tips (except not april fools)
QuoteHmm, what project are we talking about here?
- k0d3rrr
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
How do I make an infinite loop in HTML?
- PoIygon
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
How do I make an infinite loop in HTML?HTML is a markup program not a scripting program. Of you wanna do it in python you do “while true” and in js you do “while (true) {}”
- k0d3rrr
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Okay!How do I make an infinite loop in HTML?HTML is a markup program not a scripting program. Of you wanna do it in python you do “while true” and in js you do “while (true) {}”
And then this happened:

- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
How do I make an infinite loop in HTML?But you can do
<script type="javascript">
while (true){
// blah blah
}
</script>
- NFlex23
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
(#5)A better version of that code would be this:When I press the button, I'd like the colour change to radiate out from the icon, is this even possible?Yep - using CSS's animation property - https://stackoverflow.com/questions/44783546/radiateout-with-css-animation
Now that example is on hover, and since you want on click, you can use an onclick eventlistener to add a class to it, and using the animationend evenetlistener, to remove the class for it. Like this -element.addEventListener("click", () => element.classList.add("radiate")) element.addEventListener("animationend", () => element.classList.remove("radiate"))
and your CSS should look like this.radiate { /* .5s is the duration of the animation, you can change this to any number of seconds */ animation: radiate .5s; } @keyframes radiate { to { /* a scale of 1 is 100% size, 1.5 will be 150% */ transform: scale(1.5); /* it should disappear completely after the animation */ opacity: 0; } }
.radiate:active { transform: scale(1.5); opacity: 0; transition: all .5s; /* Applying transition after makes it single-directional */ }
Last edited by NFlex23 (April 22, 2022 16:20:00)
- Socialix
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
that still needs the power of yellow programming languageHow do I make an infinite loop in HTML?But you can do<script type="javascript">
while (true){
// blah blah
}
</script>
THINK INSIDE THE BOX
- ScolderCreations
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Using CSS properties, it is possibly possible to create an infinite loop in HTML. Using the after property, I theorize that you might be able to use it to create an element that will be affected by the property, which would happen infinitely. Although there is probably some sort of limit preventing that from happening.
- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
well the power's user is HTML so boomthat still needs the power of yellow programming languageHow do I make an infinite loop in HTML?But you can do<script type="javascript">
while (true){
// blah blah
}
</script>
THINK INSIDE THE BOX
- Maximouse
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Using CSS properties, it is possibly possible to create an infinite loop in HTML. Using the after property, I theorize that you might be able to use it to create an element that will be affected by the property, which would happen infinitely. Although there is probably some sort of limit preventing that from happening.CSS can't create elements, so I don't think that's possible. Even if it was, it still wouldn't be “an infinite loop in HTML”.
- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
MaybeUsing CSS properties, it is possibly possible to create an infinite loop in HTML. Using the after property, I theorize that you might be able to use it to create an element that will be affected by the property, which would happen infinitely. Although there is probably some sort of limit preventing that from happening.CSS can't create elements, so I don't think that's possible. Even if it was, it still wouldn't be “an infinite loop in HTML”.
element::after::after::after...
- TheSmartGuy1234
-
Scratcher
1000+ posts
Scratch tech tips (except not april fools)
Teach me how to detect trustworthy open source softwareopen github. read.
- Discussion Forums
- » Advanced Topics
-
» Scratch tech tips (except not april fools)










