3 Replies Latest reply on Aug 30, 2006 7:56 AM by Craig Grummitt

    PLEASE PLEASE PLEASE

    Khoramdin
      Hello,

      I have created TWO Flash movies. They work just fine individually, but I get problem when I put one into another one!

      The main Flash is a Menu and the second one if a Photo Album. The Menu is series of animation (Moving Objects) which finally comes into rest and create the menu. The photo album is another SWF file which is called with in the first Flash Movie (The Menu). The SWF file is loaded as follow into the Main Flash.

      MovieClip.prototype.drawRect = function(x, y, w, h) {
      this.beginFill(0xFF0000, 100);
      this.moveTo(0, 0);
      this.lineTo(0+w, 0);
      this.lineTo(0+w, 0+h);
      this.lineTo(0, 0+h);
      this.lineTo(0, 0);
      this.endFill();
      this._x = x;
      this._y = y;
      };

      this.createEmptyMovieClip("mc6", 6);
      mc6.lineStyle (3, 0x000000, 100);
      mc6.drawRect(-77, -17, 20, 20);
      mc6._xscale = 100;
      mc6._yscale = 100;
      loadMovie("photoAlbum.swf", mc6);

      Here is the Problem! Once the main Flash is loaded the menu is built as soon as the Photo Album comes into function the Flash starts once again from the beginning of the entire Flash Movie (Beginning of the animation creating the menu) and it simply jumps into the Frame One of my Flash Movie.

      This is an Auto-loading Album which simply flips the photos! I have realized the problem arises from the “Wait Function” used in the PhotoAlbum which causes the Photo Album to pause for a period of time (Two Seconds) once a Photo is fully displayed (I have Fade in/out process for the photos). I realized everything works OK once I remove the function and rather leave the Photos to be flipped without any pausing. Here is the Wait Function which is causing the entire problem.

      function wait()
      {
      stop();
      var myInterval = setInterval(function ()
      {
      play();
      clearInterval(myInterval);
      }, 2000);
      }


      Could you tell me how I can isolate what is in layer 6 “Action Script” (Layer 6 is where the photoAlbum is loaded into) from the rest of my Flash Movie as it appears the “Play()” in the “Wait Function” is causing all the problem.

      I hope I managed to explain my problem. I would like to take this opportunity to thank you in advance for your help.

      Cheers,

      Babak
        • 1. PLEASE PLEASE PLEASE
          Craig Grummitt Level 3
          Where is the wait function defined? menu or photo album? i ask coz if it's in the menu, i'm wondering whether the problem could simply be that you need to target your photo album. eg. mc6.play(); mc6.stop();
          • 2. PLEASE PLEASE PLEASE
            Khoramdin Level 1
            Hello Craig,

            Thank you for the reply. The "Wait" function is defined in the Photo Album. That is why I don't undrestand how it could effect the Menu! The Photo Album is created seperatly and has got no relation regarding ActionScript with the menu expect that its SWFfile is call inside a movie clip by the Menu and it is placed in the blank area of the Menu. By the way, the "Wait" function is the only script that I have in my Photo Album.

            Cheers,

            Babak
            • 3. Re: PLEASE PLEASE PLEASE
              Craig Grummitt Level 3
              where do you call the wait function? in the menu? my guess is maybe you need to pull your stop() out of the wait function and onto the first frame in your photo album.
              if this doesn't help, please post links to your fla's.