8 Replies Latest reply on Jun 20, 2007 11:14 AM by chez_Lou

    Automatic page numbering in Presentations?

    chez_Lou
      Hi. New here, and rather new to Flash. I posted this in the Flash General Discussion forum as well.
      I'm working on a presentation template that will be used for over 85 presentations.

      Is there a way to insert automatic page numbering on the presentation slide, so that the slide number is displayed on each slide, and if/when the order is changed the page numbers are automatically updated?

      Any suggestions on where to look would be helpful.
      Thanks
      K
        • 1. Re: Automatic page numbering in Presentations?
          crazyjoemilan Level 2
          Yes, this is very possible. It all boils down to how you page your presentation. So how do you currently page your presentation?
          • 2. Re: Automatic page numbering in Presentations?
            chez_Lou Level 1
            A next and previous button on each slide, and a button to go back to the very first slide.
            I have applied the screen behaviors to those.
            There is also the default keyboard navigation (arrows and space bar).
            • 3. Re: Automatic page numbering in Presentations?
              crazyjoemilan Level 2
              oh, not how the user navigates pages. How are your pages built in your application?
              • 4. Re: Automatic page numbering in Presentations?
                chez_Lou Level 1
                Mmm.... guess I'm not sure what the question is :) Let's try again..

                I am using a Flash presentation document.
                For each slide/page, I add a screen from the "insert screen" menu.
                Then on each of those screens, I build the content in its own timeline.

                Is that what you were asking?
                • 5. Re: Automatic page numbering in Presentations?
                  crazyjoemilan Level 2
                  Ahh okay, I'm unfamiliar with templates. If each slide is its own frame, you can use-

                  var tmpVar:Number = _root._currentframe
                  pageText.text = "pg. " + tmpVar

                  this will create a variable, telling you the current frame on the _root timeline. If the presentation is on another timeline, you'll want to point to that (rather than _root). the second assigns the text to a textField named "pageText."

                  HmcH
                  • 6. Re: Automatic page numbering in Presentations?
                    chez_Lou Level 1
                    See, each slide isn't its own frame on the main timeline.
                    Rather it is nested under the main presentation screen, which serves as the "master slide".
                    Anything placed on that master slide gets carried over to the nested/child screens.
                    Each nested slide/screen has a unique name, and its own timeline.

                    What I need is a way to relate "var tmpVar:Number = _root._currentframe" to the current (nested) slides/screen in the presentation.

                    This is the behavior applied to the forward button, to navigate to the next screen.
                    Does that help you help me figure out what I need to do?
                    on (release) {

                    // GoTo Next Screen behavior
                    var screen = null;
                    var target = this;
                    while((screen == null) && (target != undefined) && (target != null))
                    {
                    if(target instanceof mx.screens.Screen)
                    {
                    screen = target;
                    }
                    else
                    {
                    target = target._parent;
                    }
                    }
                    if(screen instanceof mx.screens.Slide)
                    {
                    screen.rootSlide.currentSlide.gotoNextSlide();
                    }
                    // End GoTo Next Screen behavior

                    }


                    Oh, did I mention that other than stop(); and play(); ActionScript is really new to me?
                    • 7. Re: Automatic page numbering in Presentations?
                      crazyjoemilan Level 2
                      so instead of the _root, you're looking at targeting

                      screen.rootSlide.currentSlide

                      Because "currentSlide" seems to be an instance of mx.screens.Slide, take a look at the properties that it can hold (google it or view the whitepages on it).

                      MovieClip is a class which has (among other things) the methods play(), and stop(), and _currentframe. If "mx.sreens.Slide" extends MovieClip, then it has the same methods, and properties, plus bonus ones (one of which may be "_slideNumber" or something of that nature).

                      HmcH
                      • 8. Re: Automatic page numbering in Presentations?
                        chez_Lou Level 1
                        I will try that direction. Thanks for all your help Mr Helpy. I wish I could reciprocate.