Friday 22 January 2016

ANIMATION IN GAMES AND MOVIES

Adobe Flash is a program that creates animation (among other things). The animation is published to an SWF file. If you have created a Flash animation or just have access to one, you can insert it into PowerPoint. Unfortunately, the results are often problematic and depend on your version of Flash, PowerPoint, your operating system, and a feature called ActiveX. The plus side is that Flash can create awesome animation; it has  many more advanced animation features than PowerPoint.


Display the Developer tabpowerpoint-tips-insert-flash-swf-into-powerpiont-1

To access the tools for inserting the SWF file, you need to display the Developer tab. It isn’t displayed by default. Choose File (or the Office button)> (PowerPoint) Options. In PowerPoint 2007, in the Popular category, check the Show Developer Tab in the Ribbon check box. In PowerPoint 2010 and 2013, go instead to the Customize Ribbon category. On the right side of the dialog box, check the Developer check box and click OK.

Insert and configure the SWF file

Follow these steps to put a Flash movie in your PowerPoint presentation:
  1. Write down the location of the SWF file you want to use.
  2. Go to Developer tab, Controls group, More Controls.
  3. Choose Shockwave Flash Object from the list and click OK.
  4. Drag a box across the screen to get the desired size and location.
  5. Right click the box and choose Property Sheet. A window with a table of pr9operties opens.
  6. In the Properties window, click the Movie item. Type the full URL of the SWF file.
  7. Set the other parameters, if you wish, for example, Embed Movie: True;  Loop: False.
  8. Close the Properties window using its Close box.
  9. Go into Slide Show view to see the movie. If your movie didn’t appear in Normal view, it will appear when you return to Normal view after running the slide show.

Tips for best results

Here are a few tips and gottchas:
  • Match the movie background to the background of your PowerPoint template/presentation — or vice versa.
  • If the Flash movie doesn’t play, open the Properties window again and look at the Playing property. If it says False, click Playing, then the down arrow and change the Playing property to True. Read more about this below.
  • Files placed on master will play continuously from slide to slide to create an animated background (but that can get distracting).
  • PowerPoint can’t recognize any mouse clicks on top of a Flash object, so don’t make the Flash object the full size of the slide; you need to have some area to click to the next slide.
  • If the SWF animation starts to play but stalls, right-click it and choose Play.

The bug

There is a well-known bug that you may run into; it automatically changes the Playing property to False if the Flash movie is not set to loop. To test your situation, run through the presentation, close it, open it again and run through it again. Does the SWF animation play? Here are some solutions to this problem:

Use the right-click menu

In Slide Show view, right-click the SWF file and choose Play.

Save the presentation as a PowerPoint Show

Follow these steps:
  1. Reset the Playing property of the SWF file(s) to True. To do this, select the Shockwave Flash object, right click it and choose Property Sheet. On the Playing row, click so you see a drop-down arrow, then click the arrow and choose True.
  2. Save the presentation as a Show. First save your presentation, then choose File > Save As. From the Save as Type drop-down list, choose PowerPoint Show (*.ppsx). Keep the same file name and click Save.
From now on you can play the presentation by opening the .ppsx file and the Flash movie will always play. However, it may not play if you display the slide with the SWF file a second time while the file is open.

Create some Visual Basic for Applications (VBA) code to control the Playing property

This method is more complex but lets you present from the original presentation file. Use this method if others will modify the PowerPoint presentation.
Follow the same steps to insert the Flash movie. In step 7, change the Loop seetting to False. Now follow these steps to create the VBA code:
  1. On the Developer tab,  click the View Code button. The Microsoft Visual Basic for Applications window opens.
  2. Choose Insert > Module.
  3. In the main window, enter the following code, where the number in the 3rd line after the word “Slides” is the number of the slide containing the Flash movie.
  4. That’s it! Return to your presentation and play it through in slide show view to test it.
Sub OnSlideShowPageChange()
Dim obj As ShockwaveFlash
Set obj = _ ActivePresentation.Slides(2).Shapes(“ShockwaveFlash1”).OLEFormat.Object
obj.Playing = True
obj.Rewind
obj.Play
End Sub
As you can see, the code simply sets the Playing property to true, rewinds the movie, and plays it.
Note: if you want more than one Flash movie in a presentation, you need to give additional movies unique shape names in the 4th line of the code. The 2nd one could be “ShockwaveFlash2” for example. Then, in the Properties window, give the object the same name in the Name row.
Next, go to the slide containing the Flash movie. From the Drawing toolbar, insert a blank Action Button. In the Action Settings dialog box that opens, choose the Run Macro option, choose the macro from the drop-down list (“OnSlideShowPageChange” in the previous example), and click OK. With the action button still selected, type some text on the button, such as “Play Movie” to label the button. Now, whenever you need to play the movie in slide show view, you can simply click the button.
You can also use the button to replay the animation if your audience wants to see it a second time.
Your macro security settings may stop the VBA code from running. Make sure it isn’t set to high.  Go to File/Office buttons > (PowerPoint) Options > Trust Center> Trust Center Settings> Macro Security and choose a different setting. If you choose the setting to enable all macros, I recomment that you change the seting back to its original value when you’re done presenting. In addition, coding in the Flash file itself may stop the movie from playing.
When you save the file, you’ll be prompted to save it as a macro-enabled presentation, which is a PPTM file.

No comments:

Post a Comment