5 Replies Latest reply on Oct 7, 2006 12:04 AM by mcafe

    Resize object

    mcafe
      Hi,

      I got problem when resiz on movie clip. This some info hope that someone can help me.
      On the sreen the movie clip i put name as 'DisplayResult', the width = 200, height =50, x = 100, and y = 1000.

      When some button click, the DisplayResult need to resize into width = 400, height = 100, it succcess... but the x and y it run of... can i already try use script to fixed the x and y... it still run of. I want the movie clip on same position.

      Every button i click the size will x2 from original. This my code, are this effect the x, y??

      _root.DisplayResult.width = _root.DisplayResult.width *2
      _root.DisplayResult.height = _root.DisplayResult.Height *2
      _root.DisplayResult._x = 100
      _root.DisplayResult._y = 1000

      can someone tell me what problem happen??

      Thank you for speding time on my problem.

      Regards,
      Mc
        • 1. Re: Resize object
          crazyjoemilan Level 2
          is your movieclip embedded video? or just a standard flash mc? If its just a flash mc, use

          ._width
          and
          ._height

          If its embedded video, you have .Height (which should be .height)

          does that help?
          • 2. Re: Resize object
            rick1212
            It should look like this....

            _root.DisplayResult._width = _root.DisplayResult.width *2
            _root.DisplayResult._height = _root.DisplayResult.Height *2
            _root.DisplayResult._x = 100
            _root.DisplayResult._y = 1000

            Use ._width to set a value and .width to get a value.

            Also, just some personal advice, try to stay away from the _root. Try useing _parent even if you have to 2 or 3 of them together to path back to where you need to be.
            • 3. Resize object
              mcafe Level 1
              Hi,

              Thank you for reply, this is Sample of what i means.

              I want to fixed to bar on left site, when each time i change the widht the position of the bar will run of can't statis stay at left site.

              Can someone help me on this problem, i search many topic about the widht, height, registration point, and so on. I still don't know what happen.

              Thank you and sorry for my problem. I hope someone can reply me asap, quite urgent i stuck on this part quite long.

              Regards,
              Mc
              • 4. Resize object
                mcafe Level 1
                quote:

                Originally posted by: Mr Helpy mcHelpson
                is your movieclip embedded video? or just a standard flash mc? If its just a flash mc, use

                ._width
                and
                ._height

                If its embedded video, you have .Height (which should be .height)

                does that help?


                Hi Mr Helpy,

                thank you for reply, i tester with it. Can't also, above it attach the sample what i means. Can help me see around?

                Regards,
                Mc

                quote:

                Originally posted by: rick1212
                It should look like this....

                _root.DisplayResult._width = _root.DisplayResult.width *2
                _root.DisplayResult._height = _root.DisplayResult.Height *2
                _root.DisplayResult._x = 100
                _root.DisplayResult._y = 1000

                Use ._width to set a value and .width to get a value.

                Also, just some personal advice, try to stay away from the _root. Try useing _parent even if you have to 2 or 3 of them together to path back to where you need to be.


                Hi rick1212,

                Erm, i try both of them. It still can't. Can you help me see the sample above?? I put the sample there.

                Thank you.

                Regards,
                Mc
                • 5. Resize object
                  mcafe Level 1
                  Hi all,

                  thank you for spending time on my problem, the problem i alredy fix. The x,y on screen different when on script.

                  Regards,
                  Mc