locked
Scrolling window RRS feed

  • Question

  • How I can get a AutoReverse propierty working from a button with mouse enter then play and mouse leave then pause? Is it possible in the exact point of the storyboard? Also there is another button to play, pause and resume method. Or it can be a Function with mouse enter and sender.findName("myStoryboard").AutoReverse = "True" and AutoReverse = "False" in the XAML? Is there some right mode? It is a scroll window with many text to move the text up and donw.
    Friday, December 7, 2007 10:30 AM

Answers

  • Two Storyboards cause a loss of the exact point of the pause.Then I did a Storyboard with up translation. This canvas of the Storyboard  has a child element with another  Storyboard with down translation.

    Hi Ruben,

    As I see it the problem you have is by setting the "from" property in your animation, instead just set "to" property in animation and the from will be automatically use the current position.

    Saturday, December 8, 2007 3:24 PM

All replies

  • Hi Ruben,

    It is not available in Silverlight 1.1 Alpha, yeah what you are saying about AutoReverse=True/Flase would be ideal, and you only have to create one single animation and access two animations, and its pretty simple actually. I wonder why MSFT haven't thought about it in Alpha but I am sure it will be available in Beta.

    For now you have to settle by creating two Storyboard with only From/To properties reversed.

     

    Friday, December 7, 2007 11:55 PM
  • Thank you very much by your time, Cass.

    Yesterday I was trying a similar solution. 

    It seems  to work better now, also I was using Autoreverse propierty, but it didn’t work.Two Storyboards cause a loss of the exact point of the pause.Then I did a Storyboard with up translation. This canvas of the Storyboard  has a child element with another  Storyboard with down translation. And opacity =0 for the inactive animated element.

    The arrows have MouseLeftButtonDown to play the Storyboard and  MouseLeftButtonUp to pause the Storyboard.

    I put the testing project in my site: http://www.viewpoint.cl/whoAre/Default.html

    Now I'm trying to fix some little issues.

    The BLOCKED SCRIPT

    function buttonUpButtonDown(sender, eventArgs)

       sender.findName("texto3Storyboard").begin();
      
      var bgTextoHsi = sender.findName("bgTextoHsi");
      bgTextoHsi.opacity = 1;
      
      var texto1 = sender.findName("texto1");
      texto1.opacity = 1;
      
      var bgTextoHsi_Copy = sender.findName("bgTextoHsi_Copy");
      bgTextoHsi_Copy.opacity = 0;
      
      var texto1_Copy = sender.findName("texto1_Copy");
      texto1_Copy.opacity = 0;
      
    }
    function buttonDownMoveDown(sender, eventArgs)

       sender.findName("textoDownStoryboard").begin();
      
        // alpha Up
      var bgTextoHsi = sender.findName("bgTextoHsi");
      bgTextoHsi.opacity = 0;
      
      var texto1 = sender.findName("texto1");
      texto1.opacity = 0;
      
      var bgTextoHsi_Copy = sender.findName("bgTextoHsi_Copy");
      bgTextoHsi_Copy.opacity = 1;
      
      var texto1_Copy = sender.findName("texto1_Copy");
      texto1_Copy.opacity = 1;
      
    }
    function buttonUpButtonUpper(sender, eventArgs)

       sender.findName("texto3Storyboard").pause();
    }
    function buttonDownPause(sender, eventArgs)

       sender.findName("textoDownStoryboard").pause();
    }

     

    Saturday, December 8, 2007 9:09 AM
  • Two Storyboards cause a loss of the exact point of the pause.Then I did a Storyboard with up translation. This canvas of the Storyboard  has a child element with another  Storyboard with down translation.

    Hi Ruben,

    As I see it the problem you have is by setting the "from" property in your animation, instead just set "to" property in animation and the from will be automatically use the current position.

    Saturday, December 8, 2007 3:24 PM
  • Thank you very much, Cass! Yes, this is the problem... I will work in it.
    Saturday, December 8, 2007 3:46 PM