开发者

swfLoader vs mx Image

I have an application that I'm migrating from flex 3 to flex 4.5. In this application, there is some mx Image components that load a simple开发者_如何学编程 swf file (image). Spark image doesn't load swf files, so I was wondering, should I keep the mx Image, or should I change it to SWFLoader? Is there any advantages to using one or the other?


Reading Adobe documentation about Image control:

Adobe Flex supports several image formats, including GIF, JPEG, and PNG. You can import these images into your applications by using the Spark Image control or BitmapImage. To load SWF files, you use the SWFLoader control.

The Image control is part of both MX and Spark component sets. While you can use the MX Image control in your application, Adobe recommends that you use the Spark Image control instead.

As it states and recommends, it's better to use the spark architecture, instead the mx one (whenever it's possible. It's not a good idead to mix spark and mx components, but Adobe has not migrated every single component to spark yet). I'll go for <s:SWFLoader /> (which is already a new nomenclature for <mx:SWFLoader />.)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜