Disabling animation

Last post 12-04-2006 8:54 PM by Ted Glaza [MSFT]. 1 replies.

Sort Posts:

  • Disabling animation

    11-30-2006, 4:04 PM
    • Member
      10 point Member
    • ilako
    • Member since 11-14-2006, 4:28 PM
    • Posts 2

    I have set up an animation and it works fine. I need this animation to fire only on certain conditions which are determined on the server side during OnLoad.

    How can I modify the animation from OnLoad so that nothing happens when the condition is not true?

     

    Thanks 

     

    <div id="emailAddressLabelDiv" runat="server" style="width:100%; border: 1px solid rgb(102, 102, 102); ">
            <label id="emailAddressLabel" runat="server" width="100%"/>
        </div>
        <div id="info" runat="server" style=" visibility:hidden; z-index:50; position:absolute; font-size: 12px; border: solid 1px #666666; background-color: #FFFFFF; min-width:200px">
            <table width="100%">
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <div style="float:right;" id="closeButtonDiv" runat="server" title="Close">
                            <a onclick="return false;" runat="server" id="closeButton" title="Close" href="javascript:void(0)" style="padding: 5px; text-decoration:none;background-color:#666666;color:White;text-align:center;font-weight:bold;">X</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p runat="server" id="infoParagraph">
                            This is where the info goes.       
                        </p>
                    </td>
                </tr>
            </table>
        </div>
        <atlasToolkit:AnimationExtender ID="openAnimation" runat="server">
            <atlasToolkit:AnimationProperties TargetControlID="emailAddressLabelDiv">
                <Animations>
                    <OnClick>
                        <Sequence>
                            <EnableAction Enabled="false" />
                            <StyleAction AnimationTarget="info" Attribute="visibility" Value="visible"/>
                            <Parallel AnimationTarget="info" Duration=".3" Fps="25">
                                <Move Horizontal="0" Vertical="-21" />
                                <Color StartValue="#AAAAAA" EndValue="#FFFFFF"
                                       Property="style" PropertyKey="backgroundColor" />
                                <FadeIn />
                            </Parallel>
                        </Sequence>
                    </OnClick>
                </Animations>
            </atlasToolkit:AnimationProperties>
        </atlasToolkit:AnimationExtender>
        <atlasToolkit:AnimationExtender ID="closeAnimation" runat="server">
            <atlasToolkit:AnimationProperties TargetControlID="closeButton">
                <Animations>
                    <OnMouseOver>
                        <StyleAction Attribute="color" Value="red"/>
                    </OnMouseOver>
                    <OnMouseOut>
                        <StyleAction Attribute="color" Value="white"/>
                    </OnMouseOut>
                    <OnClick>
                        <Sequence>
                            <Parallel AnimationTarget="info" Duration=".3" Fps="25">
                                <Move Horizontal="0" Vertical="21" />
                                <Color StartValue="#AAAAAA" EndValue="#FFFFFF"
                                       Property="style" PropertyKey="backgroundColor" />
                                <FadeOut />
                            </Parallel>
                            <StyleAction AnimationTarget="info" Attribute="visibility" Value="hidden"/>
                            <EnableAction AnimationTarget="emailAddressLabelDiv" Enabled="true" />
                        </Sequence>
                    </OnClick>
                </Animations>
            </atlasToolkit:AnimationProperties>
        </atlasToolkit:AnimationExtender>

  • Re: Disabling animation

    12-04-2006, 8:54 PM
    • Contributor
      4,198 point Contributor
    • Ted Glaza [MSFT]
    • Member since 04-12-2006, 7:51 PM
    • Microsoft
    • Posts 847
    • AspNetTeam

    Hi ilako,

    There are a few ways you could do it.  The easiest would be setting openAnimation.OnLoad = null; when your condition was false.  These threads provide more details about manipulating animations server-side: http://forums.asp.net/thread/1410861.aspx, http://forums.asp.net/thread/1402943.aspx, and http://forums.asp.net/thread/1405549.aspx.

    Thanks,

    Ted 

    This posting is provided "AS IS" with no warranties, and confers no rights.
Page 1 of 1 (2 items)