我制作了一个测试视频来检查PP链接的准确程度。如果有人点击了文字,则视频应该从开始书签到结束书签。它并不总是停在最终书签上!为什么?关于powerpoint的性能问题?
我想放置图像,但我不能,因为我需要至少10个声誉。
更新 我正在使用动作设置。
带触发器的代码
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 :(得分:0)
由于我对2010版本中的某些新方法不太熟悉,可能还有其他问题,但是,似乎可能存在与使用With语句有关的一些问题。试试这个:
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