5 Replies Latest reply on Jul 29, 2006 3:29 PM by Newsgroup_User

    Really Confused

    herchmer
      Ok, I am confused. First, this is not a problem when testing the movie in authoring, but it does not work in a browser. Second, this used to work with no problems at all both in authoring and in a browser ... now it doesn't.

      I have a movie (we'll call it "main") that loads in an external swf (called "waves.swf"). The swf is composed a long animation loop with intermittent stop frames throughout. This "waves.swf" gets loaded into an empty movie clip (with an instance name of "wave") which resides on the root timeline of "main". The "main.swf", "main.html" and the "waves.swf" are all stored in the same directory.

      Basically, each time you navigate to a new section in "main" I want to tell the "waves.swf" to play. The "waves.swf" gets loaded no problem (fully loaded ... so I know that's not the problem).

      loadMovie("waves.swf", wave);

      The problem is when I ask it to play. I have tried following:

      wave.play();
      this.wave.play();
      _root.wave.play();

      Like I said, this was working previously and now it is not (when it did work, I was using this.wave.play()). I am pulling my hair out because this is AS101. Any help would be greatly appreciated.


      David Scott

        • 1. Re: Really Confused
          billwatson Level 1
          just a guess but wave.swf may be stopped in the last frame of the animation

          instead of wave.play() try wave.gotoAndPlay(1)
          • 2. Re: Really Confused
            Level 7
            <...>
            > The problem is when I ask it to play. I have tried following:
            >
            > wave.play();
            > this.wave.play();
            > _root.wave.play();
            >
            <...>


            Can you post a link to the file ?
            tralfaz


            • 3. Re: Really Confused
              herchmer Level 1
              It keeps getting more and more weird. Here's the deal. When I test in authoring, everything works fine. When I simply double click the html file it doesn't work. Additionally, buttons are acting strange (I am using some of the rp_tweens to handle button animations).

              Here's the weird part ... when I post the swfs and the html file online everything runs fine!?

              Of course I'm thrilled that it's technically working, but why am I seeing such weird behavior when I run the html file locally? I am really interested in hearing any input on this only because I've always thought running the html file locally would be fairly accurate for testing.

              here's a link to the post though I didn't post any of the source files. I figured more time would be spent trying to explain the method to my madness than solving the problem.

              www.davidryanscott.com/cloquet/test/cloquet.html

              dave scott
              • 4. Re: Really Confused
                Level 7

                "herchmer" <webforumsuser@macromedia.com> wrote in message news:eagkfs$6d7$1@forums.macromedia.com...
                > It keeps getting more and more weird. Here's the deal. When I test in
                > authoring, everything works fine. When I simply double click the html file it
                > doesn't work. Additionally, buttons are acting strange (I am using some of the
                > rp_tweens to handle button animations).
                >
                > Here's the weird part ... when I post the swfs and the html file online
                > everything runs fine!?
                >
                > Of course I'm thrilled that it's technically working, but why am I seeing such
                > weird behavior when I run the html file locally? I am really interested in
                > hearing any input on this only because I've always thought running the html
                > file locally would be fairly accurate for testing.
                >
                > here's a link to the post though I didn't post any of the source files. I
                > figured more time would be spent trying to explain the method to my madness
                > than solving the problem.
                >
                > www.davidryanscott.com/cloquet/test/cloquet.html
                >
                > dave scott
                >

                Seems to work ok, but as Bill Watson said before, when you click on a new section the wave.swf might be still running from last
                time. If that happens, the wave.swf will stop playing. Instead of just wave.play() you could set a status for wave.swf to check.
                Something like..

                btn.onRelease= function()
                {
                wave.play();
                wave.continue = true;
                }

                Then, inside of wave.swf, if the timeline is already running, when it gets to the stop frame..

                if(this.continue)
                {
                this.continue = false; // keep playing now into the next section
                }
                else
                {
                stop();
                }

                Another possibility.. when testing in browsers, make sure you empty your cache between tests, otherwise you might be looking at the
                old version coming from the cache.
                (that happens very often)
                tralfaz





                • 5. Re: Really Confused
                  Level 7
                  > btn.onRelease= function()
                  > {
                  > wave.play();
                  > wave.continue = true;
                  > }

                  Oh.. I forgot.. 'continue' is a reserved word. Use some other var name.
                  tralfaz