                            (.setBackgroundImage basket-sprite)
                            (.setLocation x y)
                            (.setFillStyle "#ff3fff"))
-        basket-body (gen-actor scene :image basket-sprite :sprite-index 1)
-        basket-head (gen-actor scene :image basket-head :events? false)]
-    (.addChild basket-container basket-body)
-    (.addChild basket-container basket-head)
+        basket-body (gen-actor :image basket-sprite :sprite-index 1)
+        basket-head (gen-actor :image basket-head :events? false)]
+    (add! basket-container basket-body)
+    (add! basket-container basket-head)
     (set! basket-container.isOpened false)
     (set! basket-container.doMunch
           (fn [& {:keys [on-finish] :or {on-finish (fn [])}}]

(defn gen-shaky-behavior
  "Generate & return a rotation behavior that will rotate a target left & right repeatedly."
  [target]
  (let [container (CAAT/ContainerBehavior.)
        total-time 1500.0
        rotation-strenght (/ (* 2 Math/PI) 140)]
    (.addBehavior
     container
     (doto (CAAT/RotateBehavior.)
       (.setFrameTime 0 (/ total-time 4))
       (.setValues 0 (- rotation-strenght))))
    (.addBehavior
     container
     (doto (CAAT/RotateBehavior.)
       (.setFrameTime (/ total-time 4) (* 2 (/ total-time 4)))
       (.setValues (- rotation-strenght) 0)))
    (.addBehavior
     container
     (doto (CAAT/RotateBehavior.)
       (.setFrameTime (* 2 (/ total-time 4)) (* 3 (/ total-time 4)))
       (.setValues 0 (+ rotation-strenght))))
    (.addBehavior
     container
     (doto (CAAT/RotateBehavior.)
       (.setFrameTime (* 3 (/ total-time 4)) (* 4 (/ total-time 4)))
       (.setValues (+ rotation-strenght) 0)))
    (.setCycle container true)
    (.setFrameTime container (.time target) total-time)
    container))

(defn gen-move-behavior
  "Generate & return a move behavior for the target. Still must be added by calling .addBehavior.

        img (-> "books"
              (->image :thumbnail [60 60])
              (->sprite :cols 3)) 
        books (gen-actor :image img :sprite-index 0)]
    (set! container.inc-book-count
          (fn []
            (.setSpriteIndex books (mod (+ (.spriteIndex img) 1) 3))))
