English 中文(简体)
我是否有理由改变空洞显示器的宽度和高度?
原标题:Is there a reason I can t change the width and height of an empty display object?

问题回答

闪电显示器 物体并非仅是其他显示器物体的集装箱,尽管可能。 在闪电中,显示器只是一个可展示的物体......可以添加到显示器上。 空洞 sp的原体大小是什么? 0x0? 1x1? 因此,规模由显示的内容决定。

尽管如此,你可以改变比额表。 X和比额表 空洞显示器。

var c:Sprite = new Sprite();
c.scaleX = c.scaleY = 2;
c.graphics.beginFill(0);
c.graphics.drawRect(0, 0, 200, 80);
c.graphics.endFill();
addChild(c);

胎面为400x160。

你可以改变一个空物体的宽度和高度,其原因是它们最终是衍生的。 连同标的的内容,plX > 尺度Y是真正确定标的大小——widthh 8,是真正方便地调整比额表的方法。

换言之,当你改变一个标的<代码>width 财产时,所有急切的做法是计算达到预期的宽度所需的“代码>X,然后将<代码>X改为该数值。 当目标空空时,除零外,没有任何比额表价值可达到任何宽度,因此闪电无视这一请求。





相关问题
Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Sorting twodimensional Array in AS3

So, i have a two-dimensional Array of ID s and vote count - voteArray[i][0] = ID, voteArray[i][1] = vote count I want the top 3 voted items to be displayed in different colors, so i have a 2nd Array -...

Virtual Tour using sketch up, ajax, flash technologies

I want to know if there are existing technology that make your 3d models in sketch into virtual tours, using either Ajax or Flash for web presentation. If there s none, which will be a good approach ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...

热门标签