3 Replies Latest reply on Jun 26, 2007 12:41 PM by Newsgroup_User

    scale up movieclip

    lammspillning Level 1
      ok, so I load an external movieclip into a holder, but I want it to scale up a little bit so it fits with the rest of the content.
      Is there any simpple code I can put on the btn that loads the external swf, so it just scale up a couple %.
      I just have this code on the button right now:

      on (release) {
      _parent.holder.loadMovie("myStuff.swf");

      }

      //S
        • 1. Re: scale up movieclip
          Level 7
          lammspillning,

          > Is there any simpple code I can put on the btn that loads
          > the external swf, so it just scale up a couple %.

          Sure thing. In fact, it's surprisingly easy -- but ... you have to make
          sure the external content is loaded before you can adjust its size. After
          that, you might, for example, set the container's _xscale and _yscale to 150
          (150%) or 120, or 104, etc.

          http://www.quip.net/blog/2006/flash/how-to-tell-when-external-swf-loaded/


          David Stiller
          Co-author, Foundation Flash CS3 for Designers
          http://tinyurl.com/2k29mj
          "Luck is the residue of good design."


          • 2. Re: scale up movieclip
            lammspillning Level 1
            ok nice! I'm not really good at actionscript and how to write it, could you show how the "scale holder" line would look like in code?
            thanx //s
            • 3. Re: scale up movieclip
              Level 7
              lammspillning,

              > ok nice! I'm not really good at actionscript and how to write
              > it, could you show how the "scale holder" line would look like
              > in code?

              Once you got to the point where you new the external SWF was loaded,
              you'd reference holder by its instance name and invoke MovieClip._xscale on
              it. Remember, movie clip symbols are instances of the MovieClip class. The
              ActionScript 2.0 Language Reference (in the Help files, F1) spells out all
              the classes in ActionScript. Classes define objects, and in general,
              they'll list one or more of the following categories: properties
              (chracteristics of an object, such as its x and y scale), methods (things
              the object can do, such as gotoAndPlay()), and events (things the object can
              react to, such as onRelease).

              holder._xscale = 104;
              holder._yscale = 104;


              David Stiller
              Adobe Community Expert
              Dev blog, http://www.quip.net/blog/
              "Luck is the residue of good design."