Checking if WebAnimator is done

Hi guys

Having not much to do today (yeah, right…), I am playing around with Xojo, trying to learn a bit more about using it for Websites and I was wondering: I was able to create a page where, when a user clicks on a button, a WebContainer appears using a WebAnimator move method, vertically, going downward. Since it does not start at the edge of the page, I created an empty WebContainer to limit the zone where the other container will appear. I wanted it to look like the information is coming out of the button clicked. This works nicely. Now, when it is time to close the information window, I want to move it vertically, again within the limit zone to make it disappear “inside the button”. And, when that is done, I want to delete the WebContainer defining the zone.

Now my problem is that when I use the Play command for the closing animation, it looks like Xojo does not wait for the animation to be done before executing the next line resulting in the Zone being closed before the animation is done. So, is there a way to check if the animation is done before continuing?

Here is the code I use:

If HomePage.Web_Anim.MoveSupported Then
	HomePage.Web_Anim.Move(Self, 0, 0 - Self, 0.5)
End If



you could add a bool property named “running” setting that in AnimationComplete-event of webanimator to false.

But, to cloese the Webcontainer, you should better put that code in AnimationComplete-event of webanimator.