What I’m Working On

August 28, 2007

Right now at my internship at HOV I’m furthering my knowledge and application on how to direct learners who are inside a Breeze/Connect presenter module to not be able to skip past a slide of animation. So far the best way I’ve been able to figure out how to do this is to disable the “next slide button”. I’ve been having this conversation with a user on the Adobe forums that has gone like this:

Date Posted:

08/17/2007 09:55:03 AM

Posted By: asm0d (Member)

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:

_root.m_controlBar.m_playBtn._onRelease();

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

The other controls are:
m_volumeBtn
m_attachmentsBtn
m_slideBackBtn
m_slideNextBtn
m_playBtn
m_viewChangeBtn
m_scrubBar

v/r

Marc B
Edited: 08/28/2007 at 07:28:50 AM by asm0d


Date Posted:

08/23/2007 10:00:38 AM

Posted By: journeydude (Member)

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.


Date Posted:

08/27/2007 06:54:45 AM

Posted By: asm0d (Member)

Hi,

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.

Quotes:
“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)”

v/r

Marc B


Date Posted:

08/27/2007 08:19:21 AM

Posted By: journeydude (Member)

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!


Date Posted:

08/27/2007 09:28:24 AM

Posted By: asm0d (Member)

Hi,

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

“_root.m_controlBar.m_playBtn._onRelease();”

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.

v/r

Marc B


Date Posted:

08/27/2007 03:09:58 PM

Posted By: journeydude (Member)

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.

Thanks!


Date Posted:

08/28/2007 07:27:29 AM

Posted By: asm0d (Member)

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.

v/r

Marc B

Edited: 08/28/2007 at 09:14:16 AM by asm0d


Date Posted:

08/28/2007 09:17:27 AM

Posted By: journeydude (Member)

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?


Date Posted:

08/28/2007 09:36:39 AM

Posted By: asm0d (Member)

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.m_playBtn.onRelease();
_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.

v/r
Marc B

“poolpah… what’s that?”


Date Posted:

08/28/2007 10:49:01 AM

Posted By: journeydude (Member)

That’s the answer I’m looking for, thanks! You’ve been very helpful. I also hope this helps the original topic poster too.

Leave a Reply