Embedding and playing movies

  • Thread starter Thread starter fox93
  • Start date Start date
F

fox93

Hi

on one powerpoint slide, the user of my presentation
should be able to click a text field and do this action

the movie should be embedded to a certain position and
started AUTOMATICALLY

got the following code:

Public WithEvents App As Application

Private Sub Label1_Click()


Set MyDoc = ActivePresentation.Slides(7)
MsgBox "dabini"
Set muuv1 = MyDoc.Shapes.AddMediaObject
(FileName:="mymovie.mpg", Left:=205, Top:=150)
With muuv1.AnimationSettings.PlaySettings
.PlayOnEntry = msoTrue
.PauseAnimation = False
.HideWhileNotPlaying = True
End With
muuv1.AnimationSettings.Animate = True

End Sub

Anyways, the movie is loaded, but you have to click it
again to make it start =((

Do I have to tell that I normally have nothing to do with
VBA and Powerpoint?

Ah yes, we agreed to use this way because the movies
don't play reliably if you embedd them the normal (GUI)
way and make them start automatically.
 
Hi fox93,
Try replacing the "muuv1.AnimationSettings.Animate = True" line with the
following:

With muuv1.AnimationSettings
.Animate = True
.AdvanceMode = ppAdvanceOnTime
.AdvanceTime = 0
End With

This will modify the animation settings for the inserted movie file to start
after 0 delay, instead of the default "on click".
 
Back
Top