Sequencer Control VBScript Example

The following sample demonstrates how to use the Sequencer control in VBScript. It rotates text, and enables the user to stop and restart the rotation by clicking a button.

<HTML>
<HEAD>
<TITLE>Microsoft DirectAnimation Controls - Sequencer</TITLE>

<SCRIPT LANGUAGE="vbscript">

Sub Window_OnLoad
    call sgMSDHTML.SetIdentity
    Button1.value="Pause"
End Sub

Sub Seq_oninit
    call seq("ActionSet1").At(0.000, "RotateAll",–1, 0.050, 1)
    Call Seq("ActionSet1").Play
End Sub

Sub RotateAll
    Call sgMSDHTML.Rotate(0,9,2)
End Sub

Sub Start
    Select Case Button1.value
    Case "Play"
        Call Seq("ActionSet1").Play
        Button1.value="Pause"
    Case "Pause"
        Call Seq("ActionSet1").Pause
        Button1.value="Play"
    End Select
End Sub

</SCRIPT>
</HEAD>


<BODY BGCOLOR=BLACK>

<OBJECT ID=sgMSDHTML
STYLE="POSITION: ABSOLUTE; HEIGHT:300;WIDTH:450;TOP:100;LEFT:60;
VISIBILITY:VISIBLE; ZINDEX:-1" CLASSID="CLSID:369303C2-D7AC-11d0-89D5-00A0C90833E6"> <PARAM NAME="Line0001" VALUE="SetLineColor(255,255,255)"> <PARAM NAME="Line0002" VALUE="SetFillColor(0,0,255)"> <PARAM NAME="Line0003" VALUE="SetFillSTYLE(1)"> <PARAM NAME="Line0004" VALUE="SetLineSTYLE(1)"> <PARAM NAME="Line0005" VALUE="SetFont('Verdana',60,650,0,0,0)"> <PARAM NAME="Line0006" VALUE="Text('Microsoft', -120, -100, 0)"> <PARAM NAME="Line0007" VALUE="Text('Dynamic', -120, -50, 0)"> <PARAM NAME="Line0008" VALUE="Text('HTML', -90, 0, 0)"> <PARAM NAME="Line0009" VALUE="Text('Multimedia', -120, 50, 0)"> </OBJECT> <OBJECT ID="Seq" CLASSID="CLSID:B0A6BAE2-AAF0-11d0-A152-00A0C908DB96" STYLE="WIDTH:2;HEIGHT:2"> </OBJECT> <INPUT TYPE=button ID="Button1" STYLE="POSITION:ABSOLUTE; TOP:10; LEFT:10; z-index:2; VALUE="";
OnClick="Start"> </BODY> </HTML>

Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.