Image的width, contentWidth ,content.width区别

原文:http://ricoonflex.wordpress.com/tag/flex/
1.width是Image loader的宽度,并不是加载的图片的。如果此属性未设置,则自适应加载图片的宽度。
自适应并不是在图片complete事件中完成,而是在updateComplete事件(晚于complete事件触发);
2.contentWidth是当加载图片形变后的宽度。如果图片未形变过,则不会得到正确的值,你会得到原始宽度而不是形变后的值。得等到Image control的updateComplete事件触发后才能得到正确的值。
3.content.width是与形变无关的加载图片的宽度。当complete事件触发后可以立即得到这个值。要注意,content就是加载的图片对象
补充:
今天才发现blogspot可以访问了,wordpress也能访问了,希望不是一时的解封
再推荐一下:对于FLEX/AIR 开发者十个很有价值的BLOG

1 comment to Image的width, contentWidth ,content.width区别

  • Hi. Cool article. There’s an concern along with your site in firefox, and you might want to check this?The browser could be the market chief and a good section of people will pass over your great writing because of this problem.

    [Reply]

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">