12 Replies Latest reply on Apr 19, 2007 12:18 PM by MotionMaker

    Q: Timeline for Slides

    Hasenstein
      (Note: I verified this behavior with a clean new slide project to make sure it wasn't my code interfering!)

      I have two (key)frames on a slide. On both I added stop(). When the slide opens the stop() is ignored and it advances to frame 2! It DOES parse the actionscript, other commands (like trace() to debug this) are played.

      Why doesn't Flash stop???


      UPDATE 1:
      ----------------------

      I found if I add an additional first frame in front of the other two, also with stop() on it, it does what I want. It stops on frame 2 now, which is my frame 1. Works as a workaround, but I feel uneasy, as I simply cannot explain why on earth it advances past frame 1 in the first place?

      Any idea?


      UPDATE 2
      -----------------------
      Slide structure is this:
      -presentation
      --title
      --slide1
      ...
      --slide n

      when slide "title" shows, a "trace(1)" on first frame of slide "slide1" is executed, and so is frame 1 of every slide! It seems frame 1 of a slide is the "slide setup & init frame" and is run when the application loads, not when the slide is revealed. When it is revealed it immediately goes to frame 2, it seems.

      Is this documented somewhere? Does anyone know why this is so, it does not make too much sense to me?
        • 1. Re: Q: Timeline for Slides
          MotionMaker Level 1
          There must additional scripts in play that are causing the jump to the next frame such as a XML loader, MovieClipLoader or timer.
          • 2. Re: Q: Timeline for Slides
            Hasenstein Level 1
            That is not so. As I said, I tested in a fresh project. See this link: http://hasenstein.com/TMP/slideTest.fla The swf is here: http://hasenstein.com/TMP/slideTest.swf)

            It is a new slide-based project. I created 3 slides to test and gave each at least two keyframes. On each keyframe there is a trace and a stop() command. Frame 1 of ALL slides is executed immediately after starting the program! It then jumps to Slide 1, SECOND Frame, immediately - part of the Adobe Flash internal initialization process. After all, I didn't add any code, this is a brand new project. I also put trace()-like output on the slides themselves, simple text that says which (key)frame your viewing at the moment.

            Also, I put a trace() before and after the stop(), and on frame 1 stop() seems to be ignored!

            I said so before (the fact that I tested this and didn't just blindly post here asking for assistance without getting my facts right first and putting some effort into it before asking others to help me for free...), but added the little test .fla project file now to help you review this.

            I don't need any more help, I only follow up because this behavior is not documented but should be, since it is completely unexpected!

            Michael
            • 3. Re: Q: Timeline for Slides
              bdwilliamsdotcom
              I noticed exactly the same thing, so you are not alone. When using slides, stop actions on the first frame don't seem to executing correctly until around frame 3.

              For example, I created a new document (File > New (Templates tab) Slide Presentations > Sharp Slide Presentation).

              I selected the marchSales slide and added a keyframe on frame 10. I moved the instance over and created a motion tween.

              I created a new layer and added a stop action to the keyframe. When the movie is tested and advanced to the slide, it automatically plays to the end, then stops on frame 1.

              If I move the stop action to frame 2, it plays through once, starts over and stops on frame 2.

              If I move the stop action to frame 3, it stops on frame 3 the first time.

              Very strange...
              • 4. Re: Q: Timeline for Slides
                MotionMaker Level 1
                1. Any code after a stop() is executed.

                stop() does not stop Actionscript. Rather stop() stops the playback head.

                2. The form based Flash movie may involve code you do not see. The slides you add are code components. They are instances of the Slide class. Thus when the Movie plays it instantiates these classes and runs code.

                I do not profess to be an expert on the Flash Slide Presentation movie but the general use is to create a navigation system without complex Actionscript. For example when you launch the movie you can use the arrow keys to navigate between slides without any Actionscript added. There are properties for each slide you can set in the Parameters tab at the bottom of the window.

                You can add content such as MovieClips and load external swfs (may need to use the contentPath parameter) to the slides that have their own code.

                You can also access the Slide instance code by looking at the Slide class. For example look at
                "using the Slide class to create a presentation".

                But I think code on the main timelines of the slides will need to be inside of on(){} methods if allowed at all.

                • 5. Q: Timeline for Slides
                  bdwilliamsdotcom Level 1
                  The problem in this situation is that the playhead should stop on frame 1 but it isn't. The only actionscript is stop(); but the playhead keeps going. I don't know if something else is happening that causes the frame 1 to be ignored.

                  As the original poster noted, frame 1 seems to be skipped altogether the first time through. I added text to the slide on Frame 1 (blank keyframe on Frame 2) and it was skipped. Frame 3 was the first frame loaded.

                  Also also tried adding a stop action within the on (reveal) transition function. It didn't stop the first time the slide loaded. When I clicked next then went back, it was stopped.

                  My conclusion is that if a slide includes more than one frame on the time, frame 1 is skipped and frame 2 or 3 displays first. When it reaches the end of the timeline and returns to frame 1, frame 1 actions are executed. If the stop action is part of the on (reveal) for the slide, it doesn't execute the first time the slide is loaded, but it does execute on subsequent loads of the page.

                  This seems to be very easy to replicate.
                  • 6. Re: Q: Timeline for Slides
                    MotionMaker Level 1
                    I seriously think you cannot do what you are doing in a Presentation Slide Show Flash movie.

                    You need to develop Movie Clips and place them on the the Slides or use the Slide parameters contentPath property to link an external Movie.

                    Slides are pre-written code applications (components). When you add one you are creating an object of code that when the Movie plays the code runs and probably defeats your code efforts on the time line.

                    Please check out the help links placed in the last post so you get the idea.

                    Otherwise start a blank Flash movie and try what you are doing and you will see it works as you think it should.
                    • 7. Re: Q: Timeline for Slides
                      Hasenstein Level 1
                      Hi MotionMaker,

                      Thanks for your replies! I think you made some excellent points. I know slides are just classes and while I didn't bother reading the code I think I'd understand it.

                      My point was not so much finding a solution - I alreay knew there is none, it's a feature due to how it's implemented internally as you pointed out - my point was to use this forum to *document* this behavior by encouraging posts such as yours, archived for all time in the searchable index of this forum :-)

                      I don't think I was the first one to encounter the issues and merely wanted to save the next person to find no good sources of information regarding slide use.

                      After getting into Flash programming, i.e. AS2 for me (using the GUI and the timeline is not really my first choice of how to program, but since I had planned on doing a quick presentation only... oh well), I must say that although there *seem* to be lots of resources available, overall behavior of ActionScript Classes and Components is not really very intuitive, when you get down to it. Okay, just an opinion, and I can't claim decades of programming experience, I admit, but I think enough to not embarass myself too much by articulating my views in public ;-).

                      PS: I also made a posting - similar to this one in that I'm already fairly sure it's a bug and there's no solution but to not use slides - about broken multi-language support in slides ( http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=15&catid=288&threadid =1260404&enterthread=y)
                      • 8. Re: Q: Timeline for Slides
                        MotionMaker Level 1
                        I agree the documentation on the Flash Presentation is more for an intermediate to advanced Flash person to make any sense. It lacks the typical examples that other parts of the super documentation they provide.

                        As well my experience in the past, the Slide Presentation Movie becomes quickly excessively large and slow in the IDE and in deployment.

                        A good approach for doing slide shows is to look for templates that emphasize the net nimble qualities of Flash.

                        • 9. Re: Q: Timeline for Slides
                          bdwilliamsdotcom Level 1
                          Thank you for the replies. I followed up on this topic because I teach a multimedia course to very novice developers. I found that these flash screens were the feature that allowed them to easily develop courseware in Flash without having to dig too deeply into ActionScript for basic navigation and screen layout. From what I've seen, they work well with the learning interactions and with behaviors. Having the ability to build a simple animation on the timeline provided without having to place them into a movieclip first would be helpful. I hope that this is identfied as a bug and not just a limitation of the slide class so that it can be fixed in a future version. For the time being, I'll just tell them to create a movieclip first - don't build out past frame 1 of the slide's timeline.
                          • 10. Re: Q: Timeline for Slides
                            MotionMaker Level 1
                            I also teach a multimedia course to newbies. I teach them some Flash including using MovieClip and Button symbols from the beginning along with the gotoAndPlay, gotoAndStop, stop, play, prevFrame and nextFrame actions all that can be easily entered via the script assist mode. They are learning these items on the first night and I hold animation off a few nights.

                            I provide a slide show template to use where the MovieClips are slides (and later in the course are pages). They learn to design the sizes of slides, build template MovieClips for slide groups and so on as part of the multimedia topics.

                            The goal of the course is multimedia production so their focus is the understanding of the assets digital images, digital sound, digital video, simple animations such as masked text slide ins, text and all that goes with that and their assembly (production) using Flash as the authoring tool into templates they get to design (some creative in it).

                            I like the students to be working with mainstream software and in the manner it is used for their profession. For Flash a starting point is using and knowing MovieClips. The Flash Slide Presentation I would say is for the person who does not want to focus on skills needed to understand this field critical tool and how it is used in real apps.

                            Second semester I move them into externally loaded media and Flash with code templates.

                            So in both semesters they get to work with templates for the basic projects and focus on the media and production and how it is best prepared for the delivery tool. As part of that they get to learn some Flash skills essential to the field.
                            • 11. Re: Q: Timeline for Slides
                              bdwilliamsdotcom Level 1
                              Thanks for the info. Where do you teach? My course is at a local university for K-12 teachers. I started out the semester teaching the basics - button and movie clip symbols, basic frame actions, keyframes and tweening, importing - then moved into encoding and importing FLV files. As soon as I introduced slides and behaviors, they were able to focus on the content instead of the coding. For these students, who want to know Flash but don't plan to become full-time developers, this seemed to be the best approach.. I'll take a look at your site later. If you have any materials to share, please let me know. My stuff is all on Blackboard until I get a chance to move it onto my site. Thanks for the feedback.
                              • 12. Re: Q: Timeline for Slides
                                MotionMaker Level 1
                                I teach credit courses for students aspiring to an Interactive Communications Degree. I also teach various community non-credit programs for folks who need to know web technology for a variety of reasons. I mainly work in the field and do this as sideline.

                                You do need to adjust the program to the course purpose and I would say if they are not going into the field professionally, your approach seems good for K-12 teachers who are likely looking for professional development and something they can apply with a minimum of time.