9 Replies Latest reply on Mar 6, 2007 4:14 AM by scottgroovez

    Load Movie and change size

    shueardm Level 1
      i'm pretty green and like some help.
      I want to load a movie clip and change the dimensions of the clip at the same time- because my main movie is 765X750 and the new clip is smaller. I want the smaller movie to play at it's native x and y size in the projector. I can't work out the script to do it. This is what I have but doesn't change the dimensions when it loads.

      on (release) {
      setProperty("_self", _height, "400");
      setProperty("_self", _width, "600");
      loadMovieNum("intro.swf", 0);

      }

      Thank you.
        • 1. Re: Load Movie and change size
          shikozel
          you need to load the intro.swf on an empty movie clip and then resize the emtry movie clip. something like that

          var holder=_root.createEmptyMovieClip("holder",_root.getNextHighestDepth())
          holder.loadMovie("intro.swf")

          // now you can size it
          holder._height=400
          holder._width=600
          • 2. Re: Load Movie and change size
            shueardm Level 1
            Hello- thanks for your reply.
            Entering your code below on (release) {

            It doesn't work. I just get the audio from the intro.swf and the other movie stays open at the original size.

            • 3. Re: Load Movie and change size
              ggshow Level 2
              on(release){
              _root.createEmptyMovieClip("holder",_root.getNextHighestDepth());
              _root.holder.loadMovie("intro.swf");
              _root.holder._height = 400;
              _root.holder._width = 600 ;
              }
              • 4. Re: Load Movie and change size
                shueardm Level 1
                Hi
                I'm sorry- that does the same thing, music changes but not movie clip. :(
                Maybe it's my player?
                • 5. Re: Load Movie and change size
                  ggshow Level 2
                  post your fla please
                  • 6. Re: Load Movie and change size
                    shueardm Level 1
                    I can't really do that for copyright reasons but I have figured something out- perhaps you could explain why?

                    My solution which works was to create a swf with the stage properties that I wanted and just one frame with the loadmovie function. So while it looks seamless, it's going from movie1>movie2>intro.swf. I also have to do the same after the intro.swf movie finishes to get back to the larger stage (of course there's another different link swf there too)

                    Man Flash is harder than I thought. :)
                    • 7. Re: Load Movie and change size
                      ggshow Level 2
                      Man,
                      Flash is the easiest among any other software i learned before.
                      Actionscript is the easiest scripting language i learned before.

                      Man... it is harder to understand your question... I still don't get it...

                      May be you just remove the copyrighted content from your fla 1st & post it?

                      Or perhap, if somebody else here can understand shueardm's question?
                      • 8. Re: Load Movie and change size
                        shueardm Level 1
                        hehe. You don't understand the question or you don't understand the solution?

                        Goal: Make CDROM Flash with movie 1 to play and one button in movie 1 to play movie 2 (intro.swf) but movie 2 is smaller stage and I want the stage to shrink otherwise it looks silly.
                        Soluition as explained is to link button to a one frame swf blank stage with the smaller properties and then code that to open movie 2 (which has same stage properties)
                        I'm sure there is an easier way but I have a solution, so thanks.
                        • 9. Re: Load Movie and change size
                          scottgroovez
                          The problem is when you load a SWF, the movieclip you're loading into inherits the properties of the SWF being loaded into it. As loadMovie happens after everything else has processed, resizing the movieclip has no effect as it simply gets reverted to the dimensions of the SWF loading in. What you need to do is run the sizing code after the loadMovie has started and the movie has begun to load.

                          I usually use a loader function that calls another function when it's finished loading. The function can contain _x = ?? & _y = ??. I also hide the loading movie or alpha it to zero and then show it or fade it in when it's finished loading.