2010年12月16日星期四

Flash Control Strategy PowerPoint Courseware

In PowerPoint courseware, insert the Flash animation is not anything new. This does not, the English courseware, English teachers should be required to insert a Flash online hosts to English songs, it really add much color for the courseware. But the English teacher in the courseware can be proposed to control the English songs, such as play, pause, fast forward, rewind and other functions. Oh, this is pretty easy for me, with the Office of the VBA can do.

Insert Flash movie

Click the "View / Toolbars / Control Toolbox", select "Other Control / Shockwave Flash Object", the slide using the mouse out of a box, adjust the size. This method of control we insert to insert a Flash control, select the current control, in the "Properties" panel to make the following settings: "MovIE" fill in the name of the required Flash movies, "name" to use the default "ShockwaveFlash1", This name later to use VBA programming.

Insert a command button

1. Production (play)

In the "Control Toolbox" select "command button," drag the slide, you can drag a command button. Adjust the size, in the "Properties" panel, set as follows: "Name" enter "cmd_play", "Caption", type "player." Double-click the button to enter the VBA editor window, enter the following:

Private Sub cmd_play_Click ()

ShockwaveFlash1.Playing = True

End Sub

2. Production (pause), (forward), (back), (back), (end) button

Button to make the method above. "Properties" panel were set as follows: the pause button in the "name" as "cmd_pause", "Caption" to "pause"; forward button button "name" as "cmd_forward", "Caption" to "move forward"; back button "name" as "cmd_back", "Caption" to "Back"; back button of the "name" as "cmd_start", "Caption" to "return"; end of the button, "name" as "cmd_end", "Caption "to" end. "

Were added for each button VBA, the command sequence is as follows:

Private Sub cmd_pause_Click ()

ShockwaveFlash1.Playing = False

End Sub

Private Sub cmd_forward_Click ()

ShockwaveFlash1.FrameNum = ShockwaveFlash1.FrameNum 30

ShockwaveFlash1.Playing = True

End Sub

Private Sub cmd_back_Click ()

ShockwaveFlash1.FrameNum = ShockwaveFlash1.FrameNum - 30

ShockwaveFlash1.Playing = True

End Sub

Private Sub cmd_start_Click ()

ShockwaveFlash1.FrameNum = 1

ShockwaveFlash1.Playing = True

End Sub

Private Sub cmd_end_Click ()

ShockwaveFlash1.FrameNum = ShockwaveFlash1.TotalFrames

End Sub

Description: (forward), (back), (back) buttons, add a player after all the command, because in practice, we found the back of the case if the command does not play, Flash movie will stop playing, so the sentence is absolutely indispensable.

3. Slideshow

See if you can control the video button is not it? What? Did not respond, then you must have the macro security is set too high, and click on "Tools / Macro / Security", the "security level" set to "low." Reopen PowerPoint, instead.

没有评论:

发表评论