diff --git a/examples/Animated/Flock.html b/examples/Animated/Flock.html
index 5bc4ee0d..7eda3086 100644
--- a/examples/Animated/Flock.html
+++ b/examples/Animated/Flock.html
@@ -273,6 +273,12 @@
groupTogether = !groupTogether;
}
+ var layer = document.activeLayer;
+ function onKeyDown(event) {
+ if (event.character == 'space')
+ layer.selected = !layer.selected;
+ }
+
// Resize the document, whenever the window is resized,
window.onresize = function(event) {
document.size = [window.innerWidth, window.innerHeight];