8 Replies Latest reply on Jan 27, 2007 9:44 PM by kglad

    loadMovieNum action

    dijonadobe
      Please help!
      I'm not an action scripter, more of a visual artist.

      I'm trying to use the loadMovieNum action to load an external .swf file into my Main Movie. It loads -- but it doesn't
      conform to size and location property values. Was under the impression that when the loadMovieNum action was used your movieclip place holder would be replaced with your loaded external movie file and would assume/retain the property values of the movieclip place holder. What am I missing?

      Also tried to Set Properties: W,H, X,Y -- still no luck.

      Online user tried tohelp in the past with the suggestion to use preloader code or the onLoadInit() method of the moviecliploader class. I'm not familiar with this.

      Please, can someone help me with this?
      Thank you so much.
        • 1. Re: loadMovieNum action
          kglad Adobe Community Professional & MVP
          loadMovieNum() does not load into a place holder movieclip. it loads into a _level. you can still control its _x,_y,_width,_height properties but you must wait until loading is complete to do so.

          with loadMovie() you can load into a target (or place holder) movieclip. you can control the _x,_y properties of the target prior to load completion. however, to control the _width, _height properties you must wait until loading is complete.

          if you want to use the moviecliploader class you would use loadClip and load into a target movieclip or a _level. again, with a target movieclip you can specify _x, _y properties any time (after the target movieclip is created) but to specify _width,_height properties you must wait until loading is complete (and the movieclip is initalized) as in the onLoadInit() method of a moviecliploader's listener.

          now, for specific help: do you want to load into a _level or a target movieclip?
          • 2. Re: loadMovieNum action
            dijonadobe Level 1
            Thank you for commenting so fast.
            Please have patience with me -- not so smart when it comes to scripting.
            I believe I want to use the loadMovie() in order to target a place holder movie clip.
            I'm OK with waiting until movie loads to change the _width, _height properties.

            Let me try some scripting to see what I encounter.
            Thanks.
            • 3. Re: loadMovieNum action
              kglad Adobe Community Professional & MVP
              if you're going to use loadMovie() (instead of using the moviecliploader class), you'll need to use preloader code to ensure your external .swf has completed loading before you try and control its _width and _height properties. for example:

              • 4. Re: loadMovieNum action
                dijonadobe Level 1
                Oh gosh! I think I'm in over my head.
                Do I really have to use the preloader scripting? My movie loads fast!!
                What is the easiest method you recommend? (it's all probably easy for you)
                I think I'm tryind to do something without complete comprehension. I get
                excited because my movie is loading just not in the size or where I want it.
                • 5. Re: loadMovieNum action
                  kglad Adobe Community Professional & MVP
                  the easiest is either above (but spell externalSWF.swf correctly) or use the moviecliploader class. i'm not sure that's easier, but here's what it would look like:

                  • 6. Re: loadMovieNum action
                    dijonadobe Level 1
                    I tried your first suggestion.
                    I just read your other post.
                    hmmm...for your quotations I've been putting in the actual name of my external file -- is that not correct?
                    I guess I'm supposed to actually type in ("exteranlSWF.swf") (with external typed correctly).

                    The movie loaded -- still not the right size or location -- but in a different location.
                    hmm....
                    • 7. Re: loadMovieNum action
                      dijonadobe Level 1
                      OK thanks. This worked.
                      • 8. Re: loadMovieNum action
                        kglad Adobe Community Professional & MVP
                        you're welcome. i'm assuming that you correctly used the name of your external swf in quotes and not externalSWF.swf that i used (unless that happens to be your external swf's file name).