5 Replies Latest reply on Jun 26, 2007 3:18 AM by wgb14

    Resize a sprite in a MIAW

    wgb14 Level 1
      Hi all,

      Is there any way to resize the sprite of a MIAW when i chnage its size. The script below change the size of the window but not the sprite that I have in. For example if the window becomes 800x480, i want the sprite that i have on its stage to also become 800x480. Is there any way to fix that?

      on mousedown

      vWindow = window().new("test8")
      vwindow.open()

      vRect = vWindow.rect
      vRect.right = vRect.left + 800
      vRect.bottom = vRect.top + 480
      vWindow.rect = vRect
      end

        • 1. Re: Resize a sprite in a MIAW
          Level 7

          You could try the drawRect property. It sort of zooms in and out on the
          stage.

          Manno

          wgb14 wrote:
          > Hi all,
          >
          > Is there any way to resize the sprite of a MIAW when i chnage its size. The
          > script below change the size of the window but not the sprite that I have in.
          > For example if the window becomes 800x480, i want the sprite that i have on its
          > stage to also become 800x480. Is there any way to fix that?
          >
          > on mousedown
          >
          > vWindow = window().new("test8")
          > vwindow.open()
          >
          > vRect = vWindow.rect
          > vRect.right = vRect.left + 800
          > vRect.bottom = vRect.top + 480
          > vWindow.rect = vRect
          > end
          >
          >
          >

          --
          ----------
          Manno Bult
          http://www.aloft.nl
          • 2. Resize a sprite in a MIAW
            wgb14 Level 1
            Well, the problem is that when i resize the window i want to resize its sprite (the sprite that I have in the particular window is an ActiveX control) as wel. None of the solutions that i know seems to work. Any ideas?
            • 3. Re: Resize a sprite in a MIAW
              wgb14 Level 1
              Ok this is what i have so far

              vWindow = window().new("test16")
              vwindow.open()


              -- set the size of the window to 800 x 480

              winLeft = (the stageRight)
              winTop = (the stageTop)
              winRight = (the stageRight + 800)
              winBot = (the stageTop + 480)
              window("test16").rect = rect(winLeft, winTop, winRight, winBot)
              window("test16").drawRect = rect(winLeft, winTop, winRight, winBot)


              Although the sprite in the window indeed becomes 800 x 480 its location is now incorrect. It appears outside the window visible area. What am i doing wrong here?
              • 4. Re: Resize a sprite in a MIAW
                Level 7
                Try something like:
                vWindow = window().new("test16")
                vwindow.open()
                -- set the size of the window to 800 x 480
                winLeft = (the stageRight)
                winTop = (the stageTop)
                winRight = (the stageRight + 800)
                winBot = (the stageTop + 480)
                window("test16").rect = rect(winLeft, winTop, winRight, winBot)
                window("test16").movie.sprite(your_number_here).rect = rect(0, 0,
                800, 480)
                • 5. Re: Resize a sprite in a MIAW
                  wgb14 Level 1
                  Again, I have no words to thank you Sean!