1 Reply Latest reply on Nov 2, 2009 7:53 AM by robdillon

    simple loadMovie problems

    MNSTRsquad

      Im trying to load a movie clip when a button is clicked

       

      heres the actionscript im using

       


      on (release) {
          this._parent.loadMovie("Video.swf", "holder", 1);
          holder._x = 611;
          holder._y = -92;
      }

       

      i want the swf to load into the holder MC,

      instead its loading the video.swf file and replacing the original swf

       

      can someone tell me what im doing wrong, it seems like it should be simple but im spending lots of time trying to figure out what im doing wrong.

      id appreciate the help.

        • 1. Re: simple loadMovie problems
          robdillon Most Valuable Participant

          It sounds like you are new to Flash. If that's the case and you are using CS3 or CS4, then you really should be learning to use Actionscript 3, not Actionscirpt 1. There are two ways that you can write a loadMovie() method. The first is to put all of the arguments inside the parens, the second is to put the target name before the loadMovie() call. So, you could write:

           

          loadMovie("Video.swf", "holder");

          or

          loadMovie("Video.swf",holder);

          or

          holder.loadMovie("Video.swf");

           

          But the way that you've written your code, you are giving Flash way too much intormation. if holder is at a level below the button that you are using then you want to use:

           

          loadMovie("Video.swf", _parent.holder);

          or

          _parent.holder.loadMovie("Video.swf");

           

          In any case, you don't need to include a level number. That would be used in the loadMovieNum() method. Something that no one needs to use ever.