[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-wmtalk
Subject:    Re: ScriptCommand Question.
From:       Scott Harrison <scotthar () MICROSOFT ! COM>
Date:       1997-02-07 20:11:42
[Download RAW message or body]


Hi Matt,  Here are some suggestions in looking at your question.

hth
scott-


The easiest thing to do is write the ScriptCommand function in this
fashion when you suspect errors:

sub ScriptCommand( szScriptType, szScriptInfo )

    '//
    '//// Insert all your own custom ScriptCommand handlers here
    '//// Include in each handler an "exit sub", since once you've
caught and
    '////   processed the event, it's most efficient to exit immediately
    '//// - the following handler shows how to do this correctly
    '// if( "MyType" = szScriptType ) then
    '//      MyEvent( szScriptInfo )
    '//      exit sub
    '//  end if

    '//
    '//URL is inherently handled, so we should skip URL ScriptCommand
events as
    '//well
    '//
    if( "URL" = szScriptType ) then
        exit sub
    end if

    '//
    '//// If we make it this far, we know there's an error, so let's
admit it :-)
    '//
    MsgBox( "Type: " & szScriptType & " is not being handled at this
time." )
end sub

That being said, the short solution is that a: the below psuedo code is
an event handler for "NSOPlay1", while the page names the OCX as
"NSOPlay", which would cause failure right there, and b:  casing may be
incorrect ( ie, if the ASF uses "Caption", then his subroutine must
compare it to "Caption", not "CAPTION"

Good luck


>----------
>From:  Matthew Luallen[SMTP:meluallen@THE-PAGES.COM]
>Sent:  Wednesday, February 05, 1997 3:08 AM
>To:    Netshow@LISTSERV.MSN.COM
>Subject:       ScriptCommand Question.
>
>
>Finally I am getting the time available to complete the project that I began
>a month and half ago, but I am really excited to get this off the ground
>because we already have a client that wants this functionality.  I have all
>of the slides for the NetShow presentation up and running and they are
>currently available through a NetShow activex client and http (I have yet to
>throw the .asf file into the asfroot).  My next two additions are text and
>then voice.
>
>I am now working on having text sent to the browser into a VBScript
>procedure.  In the project file I used the Edit / Script Commands function,
>then typed in the corresponding time to show, CAPTION and the text to display
>at this time.  Now, in my web page I have the following to catch this ...
>
>Sub NSOPLAY1_ScriptCommand(bstrType, bstrParam)
>       If bstrType = "CAPTION" Then
>               CaptionText.Text = bstrParam
>       End If
>End Sub
>
> ... where CaptionText is the name of the TextBox.  During a run, nothing
>shows up in the text box and no errors occur.  The actual setup is located at
>http://the-pages.com/ then choose movie.
>
>
>TIA.
>Matt Luallen
>The Pages Online, An Internet Development Company
>SBN Level 3, Microsoft Solutions Provider.
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic