Setup
Tutorials
Getting Started
Make it Walk
Catch the Coins
Red Light, Green Light
Guess the Number
Bouncing Hedgehog
Dodge the Rocks
Scratch → Java cheat sheet
Differences to Scratch
It doesn't work!
Costumes, Backdrops and Sounds
Examples
Cat
Cat Platformer
Clock
Coin Collector
Donut IO
Glide
Pipes
Quiz
Rainbow Vine
Random Dot
Robot
Sensing
Shader
Shakespeare
Smart Rocket
Stress Test
Tiled
Timed Dot
Timer
UI
Volume
Sprites
Sounds
For teachers
Multiple Approach Design
Abiturklassen NRW
Download
Changelog
Documentation
Sprite
Sprite()
addCostume()
addCostumes()
addSound()
ask()
broadcast()
changePosition()
changeSize()
changeTint()
changeTransparency()
changeVolume()
changeX()
changeY()
clone()
debug()
deleteThisClone()
disableHitbox()
distanceToMousePointer()
distanceToSprite()
enableHitbox()
getAnswer()
getCurrentCostumeIndex()
getCurrentCostumeName()
getDeltaTime()
getDirection()
getHeight()
getHitbox()
getMouse()
getMouseX()
getMouseY()
getPen()
getPosition()
getShaders()
getSize()
getStage()
getText()
getTimer()
getTint()
getTouchingSprite()
getTouchingSprites()
getTransparency()
getVolume()
getWidth()
getX()
getY()
glide()
goLayersBackwards()
goLayersForwards()
goToBackLayer()
goToFrontLayer()
goToMousePointer()
goToRandomPosition()
goToSprite()
hide()
hideVariable()
ifOnEdgeBounce()
isAsking()
isClone()
isColorTouchingColor()
isGliding()
isKeyPressed()
isMouseDown()
isSoundPlaying()
isTouchingColor()
isTouchingEdge()
isTouchingMousePointer()
isTouchingSprite()
isVisible()
move()
nextCostume()
pickRandom()
playSound()
pointInDirection()
pointTowardsMousePointer()
pointTowardsSprite()
previousCostume()
remove()
run()
say()
setDirection()
setHitbox()
setPosition()
setRotationCenter()
setRotationStyle()
setSize()
setTint()
setTransparency()
setVolume()
setX()
setY()
show()
showVariable()
stamp()
stopAllSounds()
stopSound()
switchCostume()
think()
turnLeft()
turnRight()
whenAddedToStage()
whenBackdropSwitches()
whenClicked()
whenIReceive()
whenKeyPressed()
whenKeyReleased()
whenMouseClicked()
whenMouseMoved()
whenRemovedFromStage()
whenStartsAsClone()
Stage
Stage()
add()
addBackdrop()
addSound()
ask()
broadcast()
changeColor()
changeTint()
changeTransparency()
changeVolume()
count()
debug()
display()
eraseAll()
exit()
find()
getAll()
getAnswer()
getCamera()
getColor()
getCurrentBackdropIndex()
getCurrentBackdropName()
getDeltaTime()
getFrameRate()
getHeight()
getMouse()
getMouseX()
getMouseY()
getPixels()
getShaders()
getSorting()
getTimer()
getVolume()
getWidth()
hideVariable()
isAsking()
isDebug()
isKeyPressed()
isMouseDown()
isSoundPlaying()
nextBackdrop()
pickRandom()
playSound()
previousBackdrop()
randomBackdrop()
remove()
removeAll()
run()
setColor()
setCursor()
setDebug()
setTint()
setTransparency()
setVolume()
showVariable()
stopAllSounds()
stopSound()
switchBackdrop()
wait()
waitUntil()
whenBackdropSwitches()
whenIReceive()
whenKeyPressed()
whenKeyReleased()
whenMouseClicked()
whenMouseWheelMoved()
Window
Window()
debug()
exit()
getDeltaTime()
getGameSpeed()
getHeight()
getInstance()
getLibraryTitle()
getLibraryVersion()
getStage()
getTextureSampling()
getWidth()
isDebug()
isPaused()
pause()
resume()
setDebug()
setGameSpeed()
setStage()
step()
transitionToStage()
useFullScreen()
useSplashLogo()
useTextureSampling()
whenExits()
Extensions
Camera
Camera
Camera()
changeX()
changeY()
changeZoom()
getPosition()
getX()
getY()
getZoom()
resetZoom()
setPosition()
setX()
setY()
setZoom()
setZoomLimit()
toGlobalPosition()
toGlobalX()
toGlobalY()
toLocalPosition()
toLocalX()
toLocalY()
File System
File
File()
load()
loadOrCreate()
loadXML()
loadXMLOrCreate()
save()
saveXML()
Pixels
Pixels
Pixels()
background()
foreground()
main()
Recorder
FFmpegRecorder
FFmpegRecorder()
saveFrame()
stop()
FrameRecorder
FrameRecorder()
saveFrame()
snapshot()
GifRecorder
GifRecorder()
saveFrame()
snapshot()
start()
stop()
Recorder
Recorder()
post()
saveFrame()
start()
stop()
Shader
Shader
Shader()
getName()
getPShader()
set()
setName()
Shaders
Shaders()
add()
get()
getCurrent()
getCurrentIndex()
getCurrentName()
next()
reset()
switchTo()
Sorting
Sorting
Sorting()
by()
byY()
getComparator()
isOn()
off()
Tiled
MapObject
MapObject()
getProperty()
getPropertyBoolean()
getPropertyFloat()
getPropertyInt()
getShape()
setClassName()
Property
Property()
setText()
TiledMap
TiledMap()
getObjectsFromLayer()
stampLayerToBackground()
stampLayerToForeground()
toString()
TilesetImage
TilesetImage()
Clock
Clock()
getDay()
getDayOfWeek()
getDaysSince2000()
getHour()
getMillisecond()
getMinute()
getMonth()
getSecond()
getYear()
AnimatedSprite
AnimatedSprite()
addAnimation()
clone()
getAnimationFrame()
getAnimationInterval()
isAnimationPlayed()
playAnimation()
resetAnimation()
setAnimationFrame()
setAnimationInterval()
toString()
Circle
Circle()
Color
Color()
changeColor()
equals()
get()
getBlue()
getGreen()
getH()
getHSB()
getL()
getRed()
getS()
hashCode()
setHSB()
setRGB()
toString()
Ellipse
Ellipse()
Hitbox
Hitbox()
contains()
getBounds()
getShape()
intersects()
translateAndRotateAndResize()
HtmlColor
HtmlColor()
getRandom()
Operators
Operators()
absOf()
acosOf()
asinOf()
atanOf()
ceilingOf()
constrain()
cosOf()
eToThePowerOf()
floorOf()
lerp()
lnOf()
logOf()
map()
max()
min()
mod()
round()
sinOf()
sqrtOf()
tanOf()
tenToThePowerOf()
Pen
Pen()
changeColor()
changeSize()
changeTransparency()
down()
eraseAll()
getColor()
getSize()
goToBackground()
goToForeground()
goToMousePointer()
goToRandomPosition()
isInBackground()
setColor()
setPosition()
setSize()
setTransparency()
stamp()
up()
Polygon
Polygon()
addPoint()
Random
Random()
noise()
noiseSeed()
random()
randomInt()
randomPosition()
randomSeed()
randomVector2()
randomX()
randomY()
Rectangle
Rectangle()
Shape
Shape()
contains()
getBounds()
intersects()
rotate()
scale()
translate()
Text
Text()
addFont()
getAlign()
getCurrentFontIndex()
getCurrentFontName()
getDefaultFont()
getDefaultFontSize()
getFont()
getPosition()
getStage()
getStyle()
getTextSize()
getWidth()
getX()
getY()
goLayersBackwards()
goLayersForwards()
goToBackLayer()
goToFrontLayer()
isUI()
nextFont()
remove()
setAlign()
setBackgroundColor()
setFont()
setIsUI()
setPosition()
setStrokeColor()
setStyle()
setTextColor()
setTextSize()
setWidth()
setX()
setY()
showText()
switchFont()
useFont()
useFontSizes()
useSmoothing()
whenAddedToStage()
whenRemovedFromStage()
Timer
Timer()
afterMillis()
everyMillis()
forMillis()
intervalMillis()
millis()
reset()
Triangle
Triangle()
UISprite
UISprite()
changeHeight()
changeWidth()
disableNineSlice()
setHeight()
setNineSlice()
setWidth()
Vector2
Vector2()
add()
angle()
clone()
distance()
distanceSq()
dot()
equals()
fromPolar()
getX()
getY()
hashCode()
length()
lengthSq()
multiply()
normalVector()
reverse()
rotateBy()
rotateTo()
sub()
toString()
unitVector()
Powered by
Hyperbook
0.112.0
Scratch for Java
JavaDoc
Contact
📧
Mail
🐘
Mastodon
👨💻
Matrix (Chat)
Setup
Tutorials
Getting Started
Make it Walk
Catch the Coins
Red Light, Green Light
Guess the Number
Bouncing Hedgehog
Dodge the Rocks
Scratch → Java cheat sheet
Differences to Scratch
It doesn't work!
Costumes, Backdrops and Sounds
Examples
Cat
Cat Platformer
Clock
Coin Collector
Donut IO
Glide
Pipes
Quiz
Rainbow Vine
Random Dot
Robot
Sensing
Shader
Shakespeare
Smart Rocket
Stress Test
Tiled
Timed Dot
Timer
UI
Volume
Sprites
Sounds
For teachers
Multiple Approach Design
Abiturklassen NRW
Download
Changelog
Documentation
Sprite
Sprite()
addCostume()
addCostumes()
addSound()
ask()
broadcast()
changePosition()
changeSize()
changeTint()
changeTransparency()
changeVolume()
changeX()
changeY()
clone()
debug()
deleteThisClone()
disableHitbox()
distanceToMousePointer()
distanceToSprite()
enableHitbox()
getAnswer()
getCurrentCostumeIndex()
getCurrentCostumeName()
getDeltaTime()
getDirection()
getHeight()
getHitbox()
getMouse()
getMouseX()
getMouseY()
getPen()
getPosition()
getShaders()
getSize()
getStage()
getText()
getTimer()
getTint()
getTouchingSprite()
getTouchingSprites()
getTransparency()
getVolume()
getWidth()
getX()
getY()
glide()
goLayersBackwards()
goLayersForwards()
goToBackLayer()
goToFrontLayer()
goToMousePointer()
goToRandomPosition()
goToSprite()
hide()
hideVariable()
ifOnEdgeBounce()
isAsking()
isClone()
isColorTouchingColor()
isGliding()
isKeyPressed()
isMouseDown()
isSoundPlaying()
isTouchingColor()
isTouchingEdge()
isTouchingMousePointer()
isTouchingSprite()
isVisible()
move()
nextCostume()
pickRandom()
playSound()
pointInDirection()
pointTowardsMousePointer()
pointTowardsSprite()
previousCostume()
remove()
run()
say()
setDirection()
setHitbox()
setPosition()
setRotationCenter()
setRotationStyle()
setSize()
setTint()
setTransparency()
setVolume()
setX()
setY()
show()
showVariable()
stamp()
stopAllSounds()
stopSound()
switchCostume()
think()
turnLeft()
turnRight()
whenAddedToStage()
whenBackdropSwitches()
whenClicked()
whenIReceive()
whenKeyPressed()
whenKeyReleased()
whenMouseClicked()
whenMouseMoved()
whenRemovedFromStage()
whenStartsAsClone()
Stage
Stage()
add()
addBackdrop()
addSound()
ask()
broadcast()
changeColor()
changeTint()
changeTransparency()
changeVolume()
count()
debug()
display()
eraseAll()
exit()
find()
getAll()
getAnswer()
getCamera()
getColor()
getCurrentBackdropIndex()
getCurrentBackdropName()
getDeltaTime()
getFrameRate()
getHeight()
getMouse()
getMouseX()
getMouseY()
getPixels()
getShaders()
getSorting()
getTimer()
getVolume()
getWidth()
hideVariable()
isAsking()
isDebug()
isKeyPressed()
isMouseDown()
isSoundPlaying()
nextBackdrop()
pickRandom()
playSound()
previousBackdrop()
randomBackdrop()
remove()
removeAll()
run()
setColor()
setCursor()
setDebug()
setTint()
setTransparency()
setVolume()
showVariable()
stopAllSounds()
stopSound()
switchBackdrop()
wait()
waitUntil()
whenBackdropSwitches()
whenIReceive()
whenKeyPressed()
whenKeyReleased()
whenMouseClicked()
whenMouseWheelMoved()
Window
Window()
debug()
exit()
getDeltaTime()
getGameSpeed()
getHeight()
getInstance()
getLibraryTitle()
getLibraryVersion()
getStage()
getTextureSampling()
getWidth()
isDebug()
isPaused()
pause()
resume()
setDebug()
setGameSpeed()
setStage()
step()
transitionToStage()
useFullScreen()
useSplashLogo()
useTextureSampling()
whenExits()
Extensions
Camera
Camera
Camera()
changeX()
changeY()
changeZoom()
getPosition()
getX()
getY()
getZoom()
resetZoom()
setPosition()
setX()
setY()
setZoom()
setZoomLimit()
toGlobalPosition()
toGlobalX()
toGlobalY()
toLocalPosition()
toLocalX()
toLocalY()
File System
File
File()
load()
loadOrCreate()
loadXML()
loadXMLOrCreate()
save()
saveXML()
Pixels
Pixels
Pixels()
background()
foreground()
main()
Recorder
FFmpegRecorder
FFmpegRecorder()
saveFrame()
stop()
FrameRecorder
FrameRecorder()
saveFrame()
snapshot()
GifRecorder
GifRecorder()
saveFrame()
snapshot()
start()
stop()
Recorder
Recorder()
post()
saveFrame()
start()
stop()
Shader
Shader
Shader()
getName()
getPShader()
set()
setName()
Shaders
Shaders()
add()
get()
getCurrent()
getCurrentIndex()
getCurrentName()
next()
reset()
switchTo()
Sorting
Sorting
Sorting()
by()
byY()
getComparator()
isOn()
off()
Tiled
MapObject
MapObject()
getProperty()
getPropertyBoolean()
getPropertyFloat()
getPropertyInt()
getShape()
setClassName()
Property
Property()
setText()
TiledMap
TiledMap()
getObjectsFromLayer()
stampLayerToBackground()
stampLayerToForeground()
toString()
TilesetImage
TilesetImage()
Clock
Clock()
getDay()
getDayOfWeek()
getDaysSince2000()
getHour()
getMillisecond()
getMinute()
getMonth()
getSecond()
getYear()
AnimatedSprite
AnimatedSprite()
addAnimation()
clone()
getAnimationFrame()
getAnimationInterval()
isAnimationPlayed()
playAnimation()
resetAnimation()
setAnimationFrame()
setAnimationInterval()
toString()
Circle
Circle()
Color
Color()
changeColor()
equals()
get()
getBlue()
getGreen()
getH()
getHSB()
getL()
getRed()
getS()
hashCode()
setHSB()
setRGB()
toString()
Ellipse
Ellipse()
Hitbox
Hitbox()
contains()
getBounds()
getShape()
intersects()
translateAndRotateAndResize()
HtmlColor
HtmlColor()
getRandom()
Operators
Operators()
absOf()
acosOf()
asinOf()
atanOf()
ceilingOf()
constrain()
cosOf()
eToThePowerOf()
floorOf()
lerp()
lnOf()
logOf()
map()
max()
min()
mod()
round()
sinOf()
sqrtOf()
tanOf()
tenToThePowerOf()
Pen
Pen()
changeColor()
changeSize()
changeTransparency()
down()
eraseAll()
getColor()
getSize()
goToBackground()
goToForeground()
goToMousePointer()
goToRandomPosition()
isInBackground()
setColor()
setPosition()
setSize()
setTransparency()
stamp()
up()
Polygon
Polygon()
addPoint()
Random
Random()
noise()
noiseSeed()
random()
randomInt()
randomPosition()
randomSeed()
randomVector2()
randomX()
randomY()
Rectangle
Rectangle()
Shape
Shape()
contains()
getBounds()
intersects()
rotate()
scale()
translate()
Text
Text()
addFont()
getAlign()
getCurrentFontIndex()
getCurrentFontName()
getDefaultFont()
getDefaultFontSize()
getFont()
getPosition()
getStage()
getStyle()
getTextSize()
getWidth()
getX()
getY()
goLayersBackwards()
goLayersForwards()
goToBackLayer()
goToFrontLayer()
isUI()
nextFont()
remove()
setAlign()
setBackgroundColor()
setFont()
setIsUI()
setPosition()
setStrokeColor()
setStyle()
setTextColor()
setTextSize()
setWidth()
setX()
setY()
showText()
switchFont()
useFont()
useFontSizes()
useSmoothing()
whenAddedToStage()
whenRemovedFromStage()
Timer
Timer()
afterMillis()
everyMillis()
forMillis()
intervalMillis()
millis()
reset()
Triangle
Triangle()
UISprite
UISprite()
changeHeight()
changeWidth()
disableNineSlice()
setHeight()
setNineSlice()
setWidth()
Vector2
Vector2()
add()
angle()
clone()
distance()
distanceSq()
dot()
equals()
fromPolar()
getX()
getY()
hashCode()
length()
lengthSq()
multiply()
normalVector()
reverse()
rotateBy()
rotateTo()
sub()
toString()
unitVector()
Powered by
Hyperbook
0.112.0
Circle
Create Shareable URL
Standalone Mode
Select Sections
Copy Shareable URL
toString()
Circle()
✎ GitHub
CC BY-NC-SA
by
OpenPatch