title: Animate image on different screen in kivy
body: <p>I am trying to automatically animate an Image that is placed in another class when the caroussel is switched. With the button it works without problems but not automatically. I tried different things with "id" but I am relatively new to this so maybe there is a general mistake.
  Usually there are 2 Screens in the screenmanager and the second screen leads to the caroussel. Due to simplicity I let the first screen out.
  Also I am planning to play a movie in Screen1 and want to stop it when the user switches to Screen2. 
  I think the main question is how can I control functions in a different class.</p>
  
  <pre><code>from kivy.app import App
  from kivy.uix.screenmanager import ScreenManager, Screen
  from kivy.lang import Builder
  from kivy.uix.boxlayout import BoxLayout
  from kivy.uix.carousel import Carousel
  from kivy.uix.label import Label
  from kivy.animation import Animation
  from kivy.uix.image import Image
  
  Builder.load_string('''
  
  #:import FadeTransition kivy.uix.screenmanager.FadeTransition
  
  &lt;Screen1&gt;:
      name: "screen1"
      Image:
          id: image1
          source: './img/somearrowup.png'
          pos: 205, 145
      Label:
          text: 'Screen down'
      BoxLayout:
          size_hint: .85,.15                  
          Button:
              text: 'Anim1'
              on_release: root.anim1()
  
  &lt;Screen2&gt;:
      name: "screen2"
      Image:
          id: image2
          source: 'somearrowdown.png'
          pos: 205, 55
      Label:
          text: 'Screen Up'
      BoxLayout:
          size_hint: .85,.15
          Button:
              text: 'Anim2'
              on_release: root.anim2()
  
  &lt;Carou&gt;:
      Screen:
          Carousel:
              id: carousel
              on_index: root.on_index(*args)
              direction: 'top'
              Screen1:
              Screen2:
  
  ''')
  
  class Screen1(Screen):    
      def anim1(self):
          self.ids.image1.pos = 205, 155
          animation = Animation(pos=(205, 145),t='out_elastic')
          animation.start(self.ids.image1)
  
  class Screen2(Screen):
      def anim2(self):
          self.ids.image2.pos = 205, 55
          animation = Animation(pos=(205, 45),t='out_elastic')
          animation.start(self.ids.image2)
  
  class Carou(BoxLayout):    
      def on_index(self, instance, value):
          if instance.current_slide.name == 'screen2':
              print ("here an animation in Screen2")
              screen = Screen2()  #doesn't work
              screen.anim2()      #doesn't work
          else:
              print ("here an animation in Screen1")
              #...
  
  class StartMenu(App):        
      def build(self):        
          sm = ScreenManager()        
          screen = Screen()        
          screen.add_widget(Carou())
          screen.name = 'carousel'
          sm.add_widget(screen)
  
          return sm
  </code></pre>
  
  <p>I would appreciate your help.</p>