This article describes how to control a Shockwave Flash
Control on a slide in your presentation.
For more information about how to insert the control in your slide, click the following article number to view the article in the Microsoft Knowledge Base:
291875 (http://support.microsoft.com/kb/291875/)
How to add a Shockwave Flash control to a slide in PowerPoint
Back to the top
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
Note The following macro examples work only in PowerPoint. Visual Basic for Applications macros are not supported by the Microsoft PowerPoint Viewer. For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
230746 (http://support.microsoft.com/kb/230746/)
PPT: Viewer: Presentation Macros Don't Run Within the Viewer
NOTE: Neither the PowerPoint Viewer nor the Macintosh versions of
PowerPoint support the use of ActiveX controls. Only Microsoft PowerPoint 97
and later can use ActiveX controls.
To create the code samples,
follow these steps:
| 1. | Press ALT+F11 to start Visual Basic Editor. |
| 2. | On the Insert menu, click Module. |
| 3. | Type the following code samples in the module. |
Start
The following subroutine starts the Flash animation:
Sub PlayShock()
Slide#.ShockwaveFlash#.Play
End Sub
NOTE:
Slide# is the slide where the Shockwave Flash control is located.
ShockwaveFlash# is the name of the Shockwave Flash Control on the slide; replace
this with the actual name of the control.
Stop
The following subroutine stops the animation:
Sub StopShock()
Slide#.ShockwaveFlash#.StopPlay
End Sub
Rewind
The following subroutine rewinds the animation back to the
beginning:
Sub RewindShock()
Slide#.ShockwaveFlash#.Rewind
End Sub
Back to the top
Adding and Configuring an Action Button
Use the following steps to link the code to the action buttons of
your choice.
| 1. | To create the action button, follow these steps:
| a. | | • | PowerPoint 2007
On the Home tab, click More in the Drawing group in the AutoShape area, and then click Action Button: Custom. | | • | PowerPoint 2000, PowerPoint 2002, and PowerPoint 2003
On the Drawing toolbar, click AutoShapes, point to Action Buttons, and then click the Action Button: Custom button. |
| | b. | Draw the action button on the slide. |
|
| 2. | In the Action Settings dialog box, click the Mouse Click tab. |
| 3. | Click Run Macro.
NOTE: You must first create the above macros to have this option
available. |
| 4. | In the list of macros, select the name of the macro you
want to attach to the button. |
| 5. | Click OK. |
Back to the top
For additional information about using ActiveX controls, click the following article number to view the article in the Microsoft Knowledge Base:
222703 (http://support.microsoft.com/kb/222703/)
How to manipulate ActiveX controls through VBA macros
Back to the top