[RESOLVED]can i disable OnHoverOver in time of animation ?

I have panel what move in the screen when <OnHoverOver>,

<OnHoverOut>move out of screen. (code below)

Everything works great but,i notice if somebody move mouse over and mouse out and back mouse over fast the panel wount finisch animation properly ,so thought if i whoud be able disable <OnHoverOver>in time of animation that woud propably fix the problem.

Thanks for any idea.

 

 

<asp:AnimationExtender ID="AnimationExtender1back" runat="server"             TargetControlID="PanelPlaceHolderVote">             

  <Animations>  <OnHoverOver>

 <Sequence AnimationTarget="PanelPlaceHolderVote">

   <EnableAction AnimationTarget="PanelPlaceHolderVote" Enabled="false" />  <StyleAction Attribute="display" Value="Block"/>  <Parallel AnimationTarget="PanelPlaceHolderVote" Duration=".3" Fps="20">  <Move Horizontal="170" Vertical="0"></Move>  <EnableAction
AnimationTarget="PanelPlaceHolderVote" Enabled="true" />  </Parallel>  

 </Sequence>

 </OnHoverOver>

 <OnHoverOut>    <Sequence AnimationTarget="PanelPlaceHolderVote">  <EnableAction AnimationTarget="PanelPlaceHolderVote" Enabled="false" />  <StyleAction Attribute="display" Value="Block"/>  <Parallel AnimationTarget="PanelPlaceHolderVote" Duration=".3"
Fps="20">  <Move Horizontal="-170" Vertical="0"></Move>   <EnableAction AnimationTarget="PanelPlaceHolderVote" Enabled="true" />  </Parallel>         </Sequence>

  </OnHoverOut>   

  <OnClick>   <Sequence AnimationTarget="PanelPlaceHolderVote">   <EnableAction AnimationTarget="PanelPlaceHolderVote" Enabled="false" />  <Parallel AnimationTarget="PanelPlaceHolderVote" Duration=".3" Fps="20">  <FadeOut Duration="1" Fps="20" />  <FadeIn
Duration="1" Fps="20" />   <EnableAction AnimationTarget="PanelPlaceHolderVote" Enabled="true" />

 </Parallel>  <StyleAction Attribute="display" Value="Block"/>      </Sequence>    </OnClick>

   </Animations>  

 

        </asp:AnimationExtender>

Hello

One options is the decrease the value in the Duration attribute in the Animation definition. As the animation is defined in a declaration way, you probably consider either having it enabled or disabled to prevent this from happening.

 

well you right,but than it looks more like popup window.

I have seen on some site very nice a smooth windows float on the screen and back no metter what.I am guessing they didnt use ajax. Propably java or flash.

Hello

If you do not mind javascript library, also consider jQuery. Try animiation method,
http://api.jquery.com/animate/

It animates in a programmatic way, and you can try stop method to stop animation immediately,
http://api.jquery.com/stop/

Leave a Reply