21 Replies Latest reply on Feb 5, 2011 7:23 PM by pstucke

    Powerpoint Scripts

    Level 7
      Anyone know a good starting point for learning to write scripts for


        • 1. Re: Powerpoint Scripts
          DHMerritt Level 1
          I am not sure if you can write scripts for Presenter, is this possible?
          What would you like to do?
          Surely one would have to use something like Flash or script in Power Point but not Presenter itself.

          I could be mistaken.
          • 2. Re: Powerpoint Scripts
            Level 7
            I'm always on the lookout for a way to cripple or omit the "Play" button,
            perhaps by replacing the default navigation with Previous and Next buttons
            contained within the slide.


            • 3. Re: Powerpoint Scripts
              sean@realeyes.com Level 1
              we've been asking for the FLA file associated with Presenter for sometime now, but to no avail. I'll post here if my guys can think of anything around your needs, would be very handy to have, for sure.
              • 4. Powerpoint Scripts
                asm0d Level 1
                If you're familiar with Flash and Actionscript, you can use a Flash module to modify the player (which is just another Flash module itself). Try including this Actionscript on a button (or something else the user would have to click) that you drop in at the start of your PPT presentation:

                _root.m_controlBar.m_playBtn._visible = false;

                This will disable the play button for the duration, but is sort of a "hack" and totally unsupported by MacroDobe. Like always, make sure Flash is set to publish to Flash Player 6, Actionscript 1 before embedding it in a Breeze presentation.


                By the way, if you change it to:


                it simulates pressing the play button - you can use this to programmatically control the Breeze player.

                The other controls are:


                Marc B
                • 5. Re: Powerpoint Scripts
                  journeydude Level 1
                  This looks very promising, however it's not working for me under the following conditions:

                  Using Adobe Presenter 6.1 Plugin for MS PowerPoint 2003

                  Created a one-frame Flash movie using Macromedia Flash 8 with the script on the first frame (as described above)

                  Created a two-slide PowerPoint, no audio, and first slide has the SWF file embedded using the 'Adobe Presenter' Menu Item -> 'Insert Flash' feature.

                  Went into the "Adobe Presenter" menu in PowerPoint, under Presentation Settings -> Flash Files Tab: Checked the 'Controlled by presentation playbar' checkbox. Tried this both with and without the checkbox checked.

                  Used the following script on that first frame: _root._m_controlBar.m_slideNextBtn._visible = false;

                  We are trying to disable the next button so learners can't skip past slide content. Under what condition(s) have you seen this work? I'm curious if our environments match.
                  • 6. Re: Powerpoint Scripts
                    asm0d Level 1

                    I think the issue you're having is due to the way Flash handles actionscript in loaded movies. The critical difference is that you've put your script on the first frame of a movie, whereas I attached it to a button the users had to click.

                    "Created a one-frame Flash movie using Macromedia Flash 8 with the script on the first frame..."

                    "Try including this Actionscript on a button (or something else the user would have to click)"


                    Marc B
                    • 7. Re: Powerpoint Scripts
                      journeydude Level 1
                      Hmm....it's still not working. Here are the things I've tried according to your answer:

                      removed all actionscript from the first frame as you menioned

                      used a button movie clip from the "buttons" common libraries panel

                      clicked on the button and went into the actions panel and put in the following code:

                      on(release) { _root._m_controlBar.m_slideNextBtn._visible = false;}

                      It still didn't work so I tried this instead:
                      gave the button an instance name ' btnDisable'

                      put the following actionscript on the first frame:

                      btnDisable.onRelease = function() { _root._m_controlBar.m_slideNextBtn._visible = false;}

                      And that didn't work either.
                      Would it be possible to contact you off list and get an example .fla for a button that you did that works?

                      Thanks very kindly!
                      • 8. Re: Powerpoint Scripts
                        asm0d Level 1

                        I think the problem is in the name you're using. The original object name:


                        and, in all your posts:

                        "root._m_controlBar.m_slideNextBtn._visible = false;"
                        "on(release) { _root._m_controlBar.m_slideNextBtn._visible = false;} "
                        "btnDisable.onRelease = function() { _root._m_controlBar.m_slideNextBtn._visible = false;}"

                        ...notice the extra underscore you've added to the object name? "_m_controlBar" instead of "m_controlBar"? It may just be a typo here on the board, but if its in your actual code that's your problem.


                        Marc B

                        • 9. Re: Powerpoint Scripts
                          journeydude Level 1
                          Thanks, you were right, the code was mistyped, but even after fixing it to conform to your code it's still not working for some reason. I now have the following conditions:

                          In my FLA I am set up with one button from the buttons common libraries pane.
                          Clicked on the button and go into the actions panel. I put in the following code:

                          on(release) {
                          _root.m_controlBar.m_playBtn._visible = false;
                          //I'm testing this on just the main play button for now.
                          //I'm still interested in doing this to the 'next slide button' for the final fix.

                          The button goes into each of its states, up and down visually, but nothing at all happens to the visibility of the play button on the main presentation in this case. I even tried some other variants to point to the root level: (i.e. _root._root. and _parent.m_controlBar.) to no avail.

                          I know this is a hack so it's not a guarantee, but again I would be interested in how our environments differ. Again here's what I'm using:

                          Flash version 8
                          Adobe Presenter 6.1
                          MS PowerPoint 2003 (latest service pack)
                          A one-frame swf file with the code on the button as shown above.

                          Any additional help or references to this working elsewhere would be appreciated.

                          • 10. Powerpoint Scripts
                            asm0d Level 1
                            Hi again,

                            I did some playing around (I have basically the same software versions as you) and I think your problem is in your publishing settings. Flash needs to be set to publish to Flash Player 6, actionscript version 1, to ensure its compatible with Breeze's player. When I set it to Flash Player 7 or 8, the code stopped working, even though it was still valid. I didn't mention it before because it's true for any Flash objects you put in a Breeze presentation (even simple animations). I'll update the original post with this info as well.

                            BTW, someone else asked why I used a button, rather than just putting it in the first frame of an embedded flash movie. While that will certainly work (automatically hiding the controlBar or whatever when they launch the training) I ran into a weird bug where the Breeze presentation would *sometimes* suck up 100% of the computer cycles, like it was stuck in a loop, slowing everything down.


                            Marc B

                            • 11. Re: Powerpoint Scripts
                              journeydude Level 1
                              That was it! Genius! Thanks very much!

                              Now a new problem: the fullscreen version of the Breeze/Connect Presenter player (the one where it doesn't show the thumbnails and slide notes, ect.) seems to have a different symbol name for the control bar. In the default version (the one that's on by default), the actionscript exposes the objects in the way you've described. If you choose the fullscreen version of the the player before you publish, the script no longer works. So a couple questions:

                              How did you figure out the instance actionscript symbol names of these objects in the first place?

                              Do you know what they are called when the Breeze/Connect player is in fullscreen mode?
                              • 12. Re: Powerpoint Scripts
                                asm0d Level 1
                                The two control bars are:

                                m_controlBar (use this when you have the panels open)
                                m_miniControlBar (use this when full screen)

                                If you choose to use "enable" (rather than visible) to turn off the default player buttons, keep in mind that it also disables the "onRelease" method we're using to programmatically advance. The workaround is to momentarily enable the bar, advance, then disable the bar again:

                                first frame code (with a button embedded):

                                //event handler
                                my_play_btn.onRelease = function (){
                                _root.m_controlBar.enabled = true;
                                _root.m_controlBar.enabled = false;

                                //disable playbar on startup:
                                _root.m_controlBar.enabled = false;

                                This is more asthetically pleasing than making it invisible as well. Just remember to insert your "play" button on every page!

                                You can identify all the properties and methods of an object using the "for - in" loop - just have the output go to a dynamic text field, and you can list everything in the controlBar object.

                                Another interesting property: _root.m_controlBar.m_currSlide._slideNum will return the current slide number (starting at zero) which is very useful for progress bars and such.

                                Marc B

                                "poolpah... what's that?"
                                • 13. Re: Powerpoint Scripts
                                  journeydude Level 1
                                  That's the answer I'm looking for, thanks! You've been very helpful. I also hope this helps the original topic poster too.
                                  • 14. Re: Powerpoint Scripts

                                    Well, asm0d, maybe your genius could extend to customizing the Adobe logo on the playbar so I can make it an ad for my company, rather than an ad for Adobe--whose software I've already shelled out a fair chunk of change for.


                                    Gregory Pius
                                    • 15. Re: Powerpoint Scripts
                                      asm0d Level 1

                                      That's an easy one :) Here's a repost:

                                      One of the most requested features on our first Breeze project was a "quit" button. The easiest way to do so in an HTML environment is to use the command

                                      javascript: window.close();

                                      Type this into the address bar on your browser, and hit return. Isn't that neat?

                                      Okay, the scripting language in Flash (Actionscript) can simulate typing something in the address bar with the command

                                      getURL ("javascript: window.close();");

                                      ...all we have to do is add that actionscript to the onRelease event handler for a button in Flash. Then, add the button to your PowerPoint before you use Presenter, and when the student clicks it... voila!

                                      This same trick can be used to replace that MacroDobe© logo in the Breeze player. This time, when the user clicks the button, we'll use javascript to pop up an alert box with a clever message:

                                      getURL ("javascript: alert('Aren't we clever?');";

                                      This button has to be small, around 50 x 29 pixels, to properly replace the logo. To actually replace it, you need to publish your presentation to the hard drive like normal. Next, find the folder you published to, and place a copy of your "button.swf" file in the "data" subfolder. Then, edit (don't "open") the vconfig.xml file in the same subfolder using notepad. Near the top, you'll find an entry that says:

                                      <uireplace name="logo" value= "" />

                                      place the name of your button file between the quotation marks and save:

                                      <uireplace name="logo" value= "button.swf" />

                                      When you load up the training next time, the logo will have changed to your button.

                                      You'll have to do this every time you publish the training, as Presenter deletes & recreates all those subfolders each time you do. BTW, MacroDobe© does offer a small applet to parse this xml file for you... but they want 5 grand per copy. I'm thinking notepad works just as well :)


                                      Marc B

                                      • 16. Re: Powerpoint Scripts
                                        Gregory_Pius Level 1
                                        Oh man alive... that's the most cleverest darn thing I've ever seen in Acrobat Connect Presenter... I'm going to give that a shot as soon as I can and post my results to the thread.

                                        Thanks a whole bunch--I'm very, very grateful.


                                        • 17. Re: Powerpoint Scripts
                                          asm0d Level 1

                                          Even though the button has to be rather small to replace the logo, it *can* load in something larger (like a pop-up navigation window) that appears anywhere on top of the viewer/presentation. You can also stick in a fair-sized flash movie in the "video" window available in the left / right-hand pane - it's supposed to be for a talking head, but I prefer to use it for either navigation window or a scroll-down text box. Yes, the notes section is okay... but its so much easier to store notes with graphics in an external file, and load it into that window.
                                          • 21. Re: Powerpoint Scripts

                                            Hi: I realize that this thread is rather old but I thought I'd share with everyone the custom Flash objects that I recently created for some Presenter presentations of my own that required me to hide some of the standard buttons.  You can find the source here and a demo here.