0 Replies Latest reply on May 8, 2007 1:51 PM by joerander

    Aligning components while animating

    joerander
      I'm pretty new to Flex, so this is probably really easy, but... I have a component aligned with the bottom of the stage that I am trying to animate when rolled over and rolled out. My issue is that for the move behavior I need to specify a y-location to start and end, but I do not know where that is depending on the size the user has set the window. I am guessing I need to somehow set a variable for the y pos of the component and use that... but, like I said, I'm pretty new at this and can't figure it out. Please help!

      Here's my code so far:

      <?xml version="1.0"?>
      <!-- behaviors\AnimateHScrollPos.mxml -->
      <mx:Application xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" >


      <mx:Sequence id="animateSlideUp" >


      <mx:Move
      id="slideUp"
      yFrom="-105"
      yTo="0"
      yBy="20"/>
      <mx:Pause
      id="holdSlide"/>
      </mx:Sequence>

      <mx:Sequence id="animateSlideDown" >
      <mx:Move
      id="slideDown"
      yFrom="0"
      yTo="-105"
      yBy="20"/>
      </mx:Sequence>


      <mx:Image source="videoProd.png"
      rollOverEffect="{animateSlideUp}"
      rollOutEffect="{animateSlideDown}" id="videoProduction" height="137" horizontalCenter="0" bottom="-105"/>
      </mx:Application>