Discuss Scratch
- Discussion Forums
- » Project Ideas
- » How to create a nice zoom in effect in Scratch. (Best with Buttons)
- retrogamerboy22
-
Scratcher
4 posts
How to create a nice zoom in effect in Scratch. (Best with Buttons)
Hello, Scratchers! I found a way to animate buttons! After you followed my instructions you should have:
Now you need to add a new variable first.
Then you should add a new script.
There you go! A brand new lovely recipe for a lovely button masterpiece. This hint is aimed at new Scratchers out there.
Scratch On!
retrogamerboy22
- A nice zoom in effect when you hover.
A nice zoom out effect when you hover out.
A nice animatiopn and sound when you click.
Now you need to add a new variable first.
(PressedDown?)
Then you should add a new script.
when @greenFlag clicked
set [PressedDown? v] to [f]
set size to (100) %
forever
if <(PressedDown?) = [f]> then
if <touching [mouse-pointer v]?> then
if <(size) \< [120]> then
change size by (5)
end
else
if <not <touching [mouse-pointer v]?>> then
if <[100] \< (size)> then
change size by (-5)
end
end
end
else
set size to (100) %
end
end
when this sprite clicked
set [PressedDown? v] to [t]
start sound [Click v]
wait (0.2) seconds
set [PressedDown? v] to [f]
There you go! A brand new lovely recipe for a lovely button masterpiece. This hint is aimed at new Scratchers out there.
Scratch On!
retrogamerboy22

- Discussion Forums
- » Project Ideas
-
» How to create a nice zoom in effect in Scratch. (Best with Buttons)
