Articles Archive
Articles Search
Director Wiki
 

Getting the (Power)Point

August 23, 1999
by Fred Bals

Two New Xtras Make Working With PowerPoint Easier Than Ever Before

When last we saw our plucky hero, he was bewailing the difficulties of integrating PowerPoint shows into Director. Constant Reader will recall that after thrashing his way through the limitations of the PowerPoint Import Xtra and the Lingo "open" command, Our Hero finally found some joy with the ActiveX Web control and, more usefully, Gary Smith's Buddy API Xtra. Inconstant Reader or those in need of a gingko biloba infusion can find a link to that story at the end of this article.

But what a difference a few months can make.

Newly arrived on the scene are two Xtras, the PPViewer Xtra from RavWare Software, and the PPAccess Xtra from Clinic Design and New Media. Developers who want the easiest way to display PowerPoint shows from within Director will find the PPViewer Xtra a godsend. And in the near future, Director will have even more control over the PowerPoint application itself with the upcoming release of the PPAccess Xtra, currently in beta. Both are powerful tools that should make the process of working with PowerPoint from a Director application much simpler, saving both development time and budget dollars.

RavWare PPViewer

http://www.ravware.com/ppviewer.htm

Single Developer Royalty-Free License $115

The creator of such useful tools as Winshaper, MUI Maker, and GLU32, Ravi Singh has now produced an Xtra specifically designed to allow Director to control the freeware Microsoft PowerPoint Viewer 97.

As I discussed in my earlier article, while the Lingo "open (this file) with (this application)" command can be used to open a PowerPoint show through the PowerPoint Viewer, this solution is unsatisfactory for developers needing more than a basic capability to launch PowerPoint presentations from a Director interface. For example, upon launch the PowerPoint Viewer automatically resizes its window to the display settings. This can be a potentially confusing experience for the audience, who may not understand how or why they've left the Director presentation. It can also be a problem for the developer, who has to deal with such issues as making the transition between the two environments as seamless as possible, and how to explain navigation through the PowerPoint show.

Xtras such as MasterApp and Buddy API offer another -- and to my mind, better -- strategy of displaying PowerPoint shows from within Director by loading the PowerPoint show behind the Director Stage, resizing the Viewer window, and then displaying a PowerPoint show as it were "layered" or "embedded" on the Stage.

Those who have used Buddy API to accomplish the task will find the RavWare PPViewer Xtra's functions very similar. As with Buddy API, PPViewer can test for the Viewer, load it, hide it behind the Director Stage, resize the Viewer window, and display a PowerPoint show as part of their Director presentation.

In fact, the PPViewer Xtra's features are so similar to the capabilities offered by Buddy API that the question arises as to whether you really need PPViewer if you already own or are thinking of purchasing Buddy API. Buddy API is rightfully nicknamed "the Swiss Army knife" of Xtras, but its wealth of commands can be disconcerting to the new user who wants to simply identify the proper steps to display a PowerPoint show. By focusing solely on controlling the PowerPoint Viewer, the PPViewer Xtra simplifies a complex process and minimizes needed scripting.

And while Buddy API can also be used to simulate Viewer keystroke commands, giving some capability of moving forward or back in a PowerPoint presentation, it has no specific commands to do so, nor to jump to a defined slide. PPViewer handles these needs more elegantly.

The commands available in the RavWare PPViewer include:

To initialize a global instance of the Xtra and test to assure that the PowerPoint Viewer is indeed installed, you would use the following code (the following examples are taken from the PPViewer Xtra documentation, copyright (c) Ravi Singh):

global PPViewer
  
on startMovie
  Set PPViewer = new(xtra "RAVPPVIEWER")
  if (objectp(PPViewer) = false) then
    -- Error: Xtra could not load,
    exit
  end if
if (RavGetProp(PPViewer,#ravViewerinstalled) = #false) then
    -- Error: Viewer is not installed on Machine
    exit
  end if
end

The next step is to ensure that the Stage is the "topmost" window so that the PowerPoint show won't be visible until it's been resized to the desired dimensions.

RavSetStageZorder(PPViewer,#ravtopmost)

There are a variety of parameters that can be used with the "RavSetStageOrderZ" command, including:

Now that we know that the Viewer is resident and will be hidden behind the Stage until needed, PPViewer can open a PowerPoint show with

RavOpenShow(PPViewer, the moviePath & "test.ppt")

and resize the show's window size to fit into the Director Stage. The following code resizes the Viewer window to 320 x 200 pixels and aligns the Viewer window with the left,top position of the Stage.

RavResizeViewer(PPViewer,320,200)
Set TempStageRect = RavGetProp(PPViewer,#ravStagerect)  
RavMoveViewer(PPViewer,the left of TempStageRect,¬
  the top of TempStageRect)

Finally,

RavSetStageZOrder(PPViewer,#ravnontopmost)
RavSetViewerZOrder(PPViewer,#ravtopmost)

makes the Viewer window topmost and presents a 320 x 200 PowerPoint show "layered" upon the Director stage.

As I noted, Buddy API can also be used to simulate Viewer keystroke commands, giving the basic capability of moving forward or back in a PowerPoint presentation. However, it has no specific commands to do so, or to jump to a defined slide. PPViewer handles these needs with the RavNextSlide, RavPrevSlide and RavGotoSlide commands. Error checking still needs to be built into your code to ensure that the slide you're attempting to move to actually exists, such as:

on TestPrevNextGoto
  if (objectp(PPViewer) = false) then
    -- Error : Xtra not loaded
    exit
  end if
  
  -- Go 1 Frame Forward
  if (RavNextSlide(PPViewer) = #false) then
    -- Error : Out of Range
    put RavGetProp(PPViewer,#ravlasterrorcodestring)
  end if
  
  -- Go 1 Frame backward 
  if (RavPrevSlide(PPViewer) = #false) then
    -- Error : Out of Range
    put RavGetProp(PPViewer,#ravlasterrorcodestring)  
  end if
  
  -- Assuming Our Slide has 5 Slides Jump to Slide 5
  if (RavGotoSlide(PPViewer,5,#true) = #false) then
    -- Error : Out of Range
    put RavGetProp(PPViewer,#ravlasterrorcodestring)  
  end if
end

Other useful and unique features of the Xtra include "#ravexitcallback", a callback handler that triggers when the Viewer window has been closed by the user, "RavEchoMovement", that allows the developer to "lock" the position of the Viewer window to the Projector window and #ravtotalslides (used in conjunction with RavGetProp) which will return the total number of slides in a slide show..

Available now for Windows 95/98 and NT, at U.S. $115 and compatible with Director 6.0 through 7.0.2, the PPViewer Xtra is a bargain. While owners of Buddy API or MasterApp who have mastered control over the Viewer may not feel the need for PPViewer, other developers will find it an invaluable and time-saving tool for displaying PowerPoint shows within Director.

PPAccess from Clinic Design and New Media

http://www.clinicdesign.com.au/clinic/xtras/index.htm

US$ 150 / Euro 147.77 per license

I once consulted on a project where the client wanted to give her sales force a "simple" presentation builder. The idea was to provide salespeople with a template and a variety of assets such as images, graphics, logos, and headlines that they could use to create customized presentation while staying within corporate branding guidelines.

We finished the Director prototype only to have the project killed when the company's IS department fixated on PowerPoint as the only allowable presentation tool. The remaining budget allocated to our project went to training the sales force in creating PowerPoint presentations.

You might wonder why we simply didn't create a PowerPoint template in the first place rather than replicating PowerPoint features in a stand-alone Director application. While a relatively simple tool to use as software goes, even PowerPoint can be confusing to the technically challenged. Our application would have had a tenth of PowerPoint's capabilities, but could be learned within literal minutes.

More importantly, our client was a fiend for branding. A logo's usage, how a title was worded, even the placement of an image in relation to other content were all of supreme importance to her. Whether the show was created in Chicago or L.A., whether it dealt with software or big iron, she wanted the audience to immediately know the message was coming from the same company. While she'd give her salespeople some limited control over content, she wanted to be in total control over how that content was presented.

It's a pity we didn't have the PPAccess Xtra at the time, as we might have been able to answer her needs as well as the IS dictum simultaneously.

Still in beta at the time of this writing, the PPAccess Xtra from Clinic Design and New Media is the first in a promised suite of Xtras offering control over Microsoft Office applications.

The PPAccess Xtra's functions include testing to ensure that the PowerPoint application is available, launching the application, hiding and displaying the PowerPoint application as desired, PowerPoint controls, and PowerPoint slideshow functions.

PPAccess commands include:

Particularly noteworthy are the PowerPoint control functions. For example, a "ppSave" command allows the user to save the active presentation. "ppSaveAs" will save the presentation under a new name, which can be user-defined.

PPAccess, as well as the PPViewer Xtra, includes commands to return the number of slides in a presentation, and to easily get the current slide number or go to a specific slide.

Far more intriguing, with PPAccess users have the capability of creating new slides within a presentation, and inserting text and graphics into that presentation.

For example,

ppInsertSlide(5) will create a new, fifth slide in a four-slide presentation (the demonstration movie provided by Clinic also contains needed error checking code for this function)

ppInsertPicture(the moviePath & "demo.jpg", 80, 80, 269, 389) will insert the 269 x 389 image "demo.jpg" at the 80,80 x,y coordinates of that slide.

ppInsertText("My Slide Text",30,30,"horizontal") will insert the phrase, "My Slide Text" slightly above and to the left of the picture.

Clinic Design and New Media provides an example Director 7 movie at its site which demonstrates in detail the various functions of the PPAccess Xtra, including more rigorous examples of inserting text and pictures than I note above. I briefly tried the beta Xtra's commands under Director 6.5, as well as 7.0.2, and it seemed to be fully compatible. However, it's an open question whether Clinic will be supporting versions of Director prior to 7. Clinic also currently has no plans to do a Mac version of the Xtra, but is exploring the possibility of creating an OLE container that may exploit the Mac PowerPoint Viewer application.

I found the beta Xtra to still have some minor problems at the time of this writing. A command that should only check for PowerPoint's availability according to the documentation launched the application in my tests, and I had inconsistent results with the "ppSetSlideShowType" function which should allow the user to set a slide show to "kiosk", "presenter", or "window". While the beta Xtra returned that the mode had been set correctly, PowerPoint didn't always reflect the change.

Still to be determined is the date of the Xtra's official release and pricing. Ian Hamilton of Clinic Design and New Media notes that release should be "very soon", dependent on final testing and developer interest. Ian expects pricing to be in the same range as the RavWare PPViewer Xtra's $115 cost. (Ed note: When this review went to press Clinic Design decided to sell the beta version of the Xtra for US$ 150 / Euro 147.77 per license).

What does all this mean from an end-user's perspective? Imagine an application where you can scan through a catalog of images, graphics, or logos, all without having to search through stock image discs or the Web and never finding exactly what you need. Where you can choose approved corporate marketing messages without having to come up with them on your own. Where all you need to do is fill out a form about your target audience with information such as company name, titles, and dates. And where with a press of a button, a PowerPoint presentation is automatically created for you ready for display in kiosk or speaker format-- all without the need for you to work within the PowerPoint application environment.

Or from a corporate marketing perspective? Imagine delivering an application to your sales force that gives the ability to quickly and easily create powerful PowerPoint presentations for sales calls and customer seminars. Presentations that you know contain approved and properly licensed photos, images, and logos. Presentations that deliver the corporate marketing messages you've worked so hard to develop. Presentations in compliance with your branding standards, and that mesh with the "look-and-feel" of your advertising and print collateral.

And finally, from a developer's perspective? Imagine your client's orgasmic reaction when you tell them all this. Imagine the big bucks you're going to charge them.

I'm hoping that developer interest in the PPAccess Xtra is high, as I'm looking forward to working with the release version. Also intriguing are Clinic's promised Word, Image, and Access "access" Xtras as well as an OLE container for PowerPoint within Director code-named "SlideShowBob." The last could well fulfill a three-year quest for me, finally providing the capability of treating a PowerPoint show as just another Sprite within Director.

We'll see. Given that I started 1999 with only kludges to integrate PowerPoint with Director and now have PPAccess and PPViewer, who knows what the rest of the year may bring?

Links:

Fred Bals' original PowerPoint article can be found on DOUG.
A demo of the RavWare PPViewer Xtra and purchase information can be found
The beta of the PPAccess Xtra including a demo Director 7 movie and purchase information.

Fred Bals is a creative director at Quantic Communications, and promises to update his Web site Real Soon Now.

Copyright 1997-2024, Director Online. Article content copyright by respective authors.