【问题标题】:How to get the Width and Height of an UIComponent, after rotating that component in Actionscript 3?在 Actionscript 3 中旋转该组件后,如何获取 UIComponent 的宽度和高度?
【发布时间】:2016-04-21 10:16:48
【问题描述】:

我正在尝试通过使用旋转该组件后获取 UIComponent 的宽度和高度

var width:Number = component.getLayoutBoundsWidth();
var height:Number = component.getLayoutBoundsHeight();

但它返回的宽度和高度与 UIComponent 旋转之前相同。

有人知道如何在旋转后获取 UIComponent 的更新高度和宽度,或者如何解决这个问题?

【问题讨论】:

    标签: actionscript-3 flex4


    【解决方案1】:

    您可以使用getBounds() 获取显示边界框。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-03-20
      • 1970-01-01
      • 2018-09-08
      • 1970-01-01
      • 1970-01-01
      • 2014-12-31
      • 1970-01-01
      • 2021-03-27
      相关资源
      最近更新 更多