Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Flash object programatically

Status
Not open for further replies.

jgillin

Programmer
Oct 22, 2003
82
US
I'm adding a shockwave flash object programmatically using code "similar" to below:

ActivePresentation.Slides(mySlide).Shapes.AddOLEObject 150, 150, 480, 320, "ShockwaveFlash.ShockwaveFlash.7", "", MsoTriState.msoFalse, "", 0, "", MsoTriState.msoFalse
Dim obj As ShockwaveFlash
Set obj = ActivePresentation.Slides(mySlide).Shapes("ShockwaveFlash1").OLEFormat.Object
obj.EmbedMovie = False
obj.Loop = False
obj.Menu = False
obj.Movie = "C:\PathToMovie\mymovie.swf"
obj.Playing = True
Set obj = Nothing

-- this basically works fine, and when in "View Show" mode, the Flash shows up fine. The problem I'm having is that up until the point when the user enters the "View Show" mode, the flash object just shows up as a placeholder with a big X placeholder. PowerPoint does something during entering that slide in "View Show" mode that initializes the Flash object. I'm trying to figure out how to duplicate that functionality so that the flash movie will show up in "design mode" (ie, don't necessary need it to be interactive, but just show the first "frame" of the flash movie like it does when you add the Flash object manually instead of programmatically).
-- does anyone have any ideas about how I might achieve this?
Thanks for any suggestions.
 
As a side note, once the movie has been played in "View Show" mode, it will then show up in design mode.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top