2013-03-26 66 views
0

我製作了一個測試視頻來檢查PP鏈接的確切程度。如果有人點擊文字,則視頻應該從開始書籤到結束書籤播放。它不會總是在結束書籤上停止!爲什麼? powerpoint的性能問題?爲什麼視頻不能完全停留在書籤上?

我想把圖像,但我不能,因爲我需要至少10聲望。

更新: 我正在使用Action設置。

與觸發代碼

Private Sub setStartAndEndPointOnVideoTrigger(activeSlide As Slide, clickShape As Shape, movieShape As Shape, _ 
          startBookmark As MediaBookmark, endBookmark As MediaBookmark) 

    Dim oEffectStart As Effect 
    Dim oEffectEnd As Effect 
    Dim obhvEffect As AnimationBehavior 
    Dim delayTime As Double 

    delayTime = (endBookmark.Position - startBookmark.Position)/1000 

    With activeSlide 
    Set oEffectStart = .TimeLine.InteractiveSequences.Add _ 
         .AddTriggerEffect(movieShape, msoAnimEffectMediaPlayFromBookmark, _ 
         msoAnimTriggerOnShapeClick, clickShape, startBookmark.Name) 

    Set oEffectEnd = .TimeLine.InteractiveSequences.Add _ 
         .AddTriggerEffect(movieShape, msoAnimEffectMediaPause, _ 
         msoAnimTriggerOnShapeClick, clickShape) 

    Set obhvEffect = oEffectStart.Behaviors.Add(msoAnimTypeCommand) 
    obhvEffect.CommandEffect.Bookmark = startBookmark.Name 

    oEffectEnd.Timing.TriggerType = msoAnimTriggerWithPrevious 
    oEffectEnd.Timing.TriggerDelayTime = delayTime 
    End With 

    End Sub 
+0

這是一個有關軟件開發/編程相關問題的網站。你的編程問題是什麼? – WiredPrairie 2013-03-26 13:45:27

+0

我使用VBA在視頻和文本之間進行鏈接。 – Argonist 2013-03-26 13:51:17

+0

您是使用Action設置來運行宏還是您正在使用ActiveX控件?請修改您的帖子以包含相關的VBA代碼。 – Taliesin 2013-03-26 14:31:00

回答

0

可能有更多的問題,因爲我不那麼熟悉一些在2010版本中的新方法,但是,它似乎有可能是關於您的一些使用問題隨着陳述。試試這個:

Private Sub setStartAndEndPointOnVideoTrigger(activeSlide As Slide, clickShape As Shape, movieShape As Shape, _ 
          startBookmark As MediaBookmark, endBookmark As MediaBookmark) 

    Dim oEffectStart As Effect 
    Dim oEffectEnd As Effect 
    Dim obhvEffect As AnimationBehavior 
    Dim delayTime As Double 

    delayTime = (endBookmark.Position - startBookmark.Position)/1000 

    With activeSlide.TimeLine.InteractiveSequences 

     With .Add(1) 
      Set oEffectStart = .AddTriggerEffect(movieShape, msoAnimEffectMediaPlayFromBookmark, _ 
           msoAnimTriggerOnShapeClick, clickShape, startBookmark.Name) 
     End With 

     With .Add(2) 
      Set oEffectEnd = .AddTriggerEffect(movieShape, msoAnimEffectMediaPause, _ 
          msoAnimTriggerOnShapeClick, clickShape) 
     End With 

    End With 

    Set obhvEffect = oEffectStart.Behaviors.Add(msoAnimTypeCommand) 
    obhvEffect.CommandEffect.Bookmark = startBookmark.Name 

    oEffectEnd.Timing.TriggerType = msoAnimTriggerWithPrevious 
    oEffectEnd.Timing.TriggerDelayTime = delayTime 

End Sub 
+0

我試過你的代碼。但它的工作原理是一樣的。視頻的停止運行良好,但不總是在書籤上!在書籤前總是停止一些秒。 – Argonist 2013-03-27 10:40:46

相關問題