6 Replies Latest reply on Feb 22, 2010 6:47 AM by JOliver77

    loadMovie Problem

    JOliver77

      Hello,

       

      I have a flash movie and on the main timeline of the movie is a movie clip on the stage called 'header_bar'.  Within header_bar is my web site navigation.

       

      Also on the main time line is a movie clip called 'fluid', and within this a movie clips called 'content_loader_mc'.

       

      I'm using 'content_loader_mc' to load in the pages of my web site movie - and when the site loads initially, I have the following code on framw 1 of 'fluid' loading the home page content into 'content_loader_mc':

       

      stop();

      this.content_loader_mc.loadMovie("home.swf");

       

      This works fine and the home.swf file loads into 'content_loader_mc' perfectly.

       

      I'm now trying to set up my navigation buttons, so that when a particular button is clicked it will load a different external .swf file into 'content_loader_mc'.  I'm doing this by putting the following code on on frame 1 of my 'header_mc' movie clip (the movie clip containing my navigation buttons):

       

      stop();

      this.who_btn_mc.onRelease=function(){

      _parent.fluid.content_loader_mc.loadMovie("who.swf");

      }

       

      This works fine initially and the who.swf loads in perfectly, however after about 6 or 7 seconds, the entire movie jumps back to frame 1 or the root time line and begins to loop from frame 1 to frame 17 (basically around my movies pre-loader).

       

      I'm totally confused :S  Can anyone help?

       

      Many thanks.

        • 1. Re: loadMovie Problem
          Ned Murphy Adobe Community Professional & MVP

          Have you tried loading other sections from the navbar yet?  Do they all have this problem?  If not, it may be something in the who file that is telling the main timeline to take a walk.  It is also possible there's something not quite right in the file that causes it to perform erratically.... sometimes that's how an error in a file manifests itself... things just keep running along the timeline.

          • 2. Re: loadMovie Problem
            JOliver77 Level 1

            Thanks for the reply..  I'll create the who.fla file again from scratch and try that (as current its a duplication of the home.fla file).

             

            I'll post back once I've got an update.  Thanks again.

            • 3. Re: loadMovie Problem
              JOliver77 Level 1

              Ive created a clean file from scratch with the same movie dimensions and the words "TEST" on the stage.  Nothing else.  I've called this test.swf and loaded it in place of the who.swf file and I'm still seeing the same issue.

               

              So, I'm not thinking that the problem is not with the loaded movie - as there's no code in the test move at all, and therefore no code to make the main timeline go for a walk.

               

              Could the problem anything to do with there already being a movie loaded in to 'content_loader_mc' (the home.swf movie), when the command arrives to load the who.swf movie?

              • 4. Re: loadMovie Problem
                Ned Murphy Adobe Community Professional & MVP

                If you are loading things in properly, the newly loaded movie should replace the one preceding it.

                • 5. Re: loadMovie Problem
                  JOliver77 Level 1

                  Okay thanks.

                   

                  Does anyone else have an idea what may be causing it?  I totally stumped

                  • 6. Re: loadMovie Problem
                    JOliver77 Level 1

                    I've got to the bottom of the problem - or at least whats causing it.

                     

                    The home.swf file that is sloading into 'content_loader_mc'  contains another swf thats loaded in..  this swf contains the following code:

                     

                    this.stop();

                    pause = function () {

                            play();

                            clearInterval(pausei);

                    }

                    pausei = setInterval(pause, 10000);

                     

                    It seems that when this code plays, its sending my main flash movie for a wlak along the _root time line.

                     

                    I've removed this code and the problem goes away.  The code is intended to cause a time delay.

                     

                    So, I know whats causing the issue - now I just dont know why! ?