如何在不影响比例的情况下调整影片剪辑的大小?

发布于 2024-08-11 00:28:18 字数 188 浏览 2 评论 0原文

我有一个宽度为 306、高度为 194 的影片剪辑对象。我需要更改影片剪辑的尺寸,并且仍将 x 和 y 比例设置为 100。目前,当我将影片剪辑宽度更改为 352.8 时, x 比例增加至 115.3%。调整影片剪辑的宽度后,我必须将比例重置为 100%。 CS3中有没有办法做到这一点? (这都是在设计模式下,而不是运行时)。我需要删除影片剪辑并重新创建它吗?

I have a movie clip object with a width of 306 and height of 194. I need to change the dimensions of the movie clip and still have the x and y scale set at 100. Currently when I change the movie clip width to 352.8, the x scale increases to 115.3%. I have to have the scale reset to 100% after I've adjusted the movie clip's width. Is there a way to do this in CS3? (this is all in design mode, not run time). Do I need to delete the movie clip and recreate it?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

已下线请稍等 2024-08-18 00:28:19

您需要将影片剪辑中的影片剪辑设置为新大小。例如背景影片剪辑(如果您不想看到它,请将 alpha 设置为 0)。父动画片段将采用其子动画片段的大小或其中绘制的内容。

You would need to set a movieclip in your movieclip to the new size. For instance a background movieclip (with alpha to 0 if you don't want to see it). The parent movieclip will take the size of its children or what is drawn in it.

败给现实 2024-08-18 00:28:19

也许有更合适的方法来做到这一点,但您可以将影片剪辑内的容器大小调整为您想要的大小。

...
   Constructor() {
      this.container = new Sprite();
      addChild(container);
   }

    override public function set width(value:Number):void{
        container.width = value;
    }

    override public function set height(value:Number):void{
        container.height = value;
    }
...

Perhaps there is a more proper way to do this, but you could resize a container inside your movieclip to the size you want.

...
   Constructor() {
      this.container = new Sprite();
      addChild(container);
   }

    override public function set width(value:Number):void{
        container.width = value;
    }

    override public function set height(value:Number):void{
        container.height = value;
    }
...
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文