2 Replies Latest reply on Jul 11, 2010 1:58 PM by 3-Putt

    Simple attachMovie question

    3-Putt

      I have a movie that needs captions sync with the voiceover. The user has the option of showing the captions (they are off by default)

       

      I have attached the captions in a movie called "text" with this code:

       

      attachMovie_btn.onRelease = function(){
          this._parent.attachMovie("text", "text_mc", 1);
          trio_mc._x = 275;
          trio_mc._y = 200;
      };

       

      The user turns it off the captions by this code:

       

      on (release) {
      _parent.text_mc.removeMovieClip();
      }

       

      My issue is if the user turns the captions off and then back on the captions start from the very first frame when the movie could be 1 minute into the presentation. I know if I could you a graphic vs. a movieclip I would have this problem except I can't control this graphic with actionscript.

       

      Two questions.

      1) Is there anyway to have the captions keep from starting on the first frame and stay sync up to the voice over the whole presentation?… could it be through  visible = false or visible = true actionscript.

       

      2) Can I control a graphic timeline vs. a movie timeline with visible = true or visible = false code?

       

      Thanks, Brian

        • 1. Re: Simple attachMovie question
          Ned Murphy Adobe Community Professional & MVP

          I don't know what keeps your captions in synch to begin with, so I can't recommend differently.  To have it stay in synch,your best bet is probably to have it always present and utilize the _visible = true/false property.  A graphic symbol is not addressable using actionscript, and doesn't have a _visible property, so you wouldn't be able to command it it to be visible or not.

          1 person found this helpful
          • 2. Re: Simple attachMovie question
            3-Putt Level 1

            Thank you.

            The visibility worked great.

             

            text._visible = false;
            this.attachMovie_btn.onRelease = function() {
                text._visible = true;
            };
            this.closeBtn.onRelease = function() {
                text._visible = false;
            };

             


            Now I just hope when I put it in a movie player and someone can scrub along on the timeline that everything stays in sync.